From 0ddf5030bebf1254c8f2ed4eed86114db0f3e9b3 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb Date: Mon, 4 Oct 2021 10:16:50 -0700 Subject: [PATCH] DOCS-13868 chunk errors in sharded transactions --- .../transactionLifetimeLimitSeconds-parameter.rst | 10 ++++++++++ source/reference/parameters.txt | 8 +++++--- source/release-notes/5.0-compatibility.txt | 5 +++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 source/includes/transactionLifetimeLimitSeconds-parameter.rst diff --git a/source/includes/transactionLifetimeLimitSeconds-parameter.rst b/source/includes/transactionLifetimeLimitSeconds-parameter.rst new file mode 100644 index 00000000000..f4ab8602719 --- /dev/null +++ b/source/includes/transactionLifetimeLimitSeconds-parameter.rst @@ -0,0 +1,10 @@ +Starting in MongoDB 5.0, if you change the +:parameter:`transactionLifetimeLimitSeconds` parameter, you must also +change :parameter:`transactionLifetimeLimitSeconds` to the same value on +all config server replica set members. Keeping this value consistent: + +- Ensures the routing table history is retained for at least as long as + the transaction lifetime limit on the shard replica set members. + +- Reduces the transaction retry frequency and therefore improves + performance. \ No newline at end of file diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 0a08c0a3eb9..12eb3d7c777 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -4014,11 +4014,11 @@ Transaction Parameters *Default*: 60 Specifies the lifetime of :doc:`multi-document transactions - `. Transactions that exceeds this limit are + `. Transactions that exceed this limit are considered expired and will be aborted by a periodic cleanup process. The cleanup process runs every :parameter:`transactionLifetimeLimitSeconds`/2 seconds or at least - once per every 60 seconds. + once every 60 seconds. The cleanup process helps relieve storage cache pressure. @@ -4042,7 +4042,9 @@ Transaction Parameters To set the parameter for a sharded cluster, the parameter must be modified for all shard replica set members. - + + .. include:: /includes/transactionLifetimeLimitSeconds-parameter.rst + .. parameter:: maxTransactionLockRequestTimeoutMillis .. versionadded:: 4.0 diff --git a/source/release-notes/5.0-compatibility.txt b/source/release-notes/5.0-compatibility.txt index a2144e5426c..58f650a47d0 100644 --- a/source/release-notes/5.0-compatibility.txt +++ b/source/release-notes/5.0-compatibility.txt @@ -337,6 +337,11 @@ If ``auditLog.runtimeConfiguration`` is set to ``false`` and an audit filter config document is present, then a startup warning will be issued but the server will not abort. +Reduce Risk of Stale Chunks in Sharded Transactions +--------------------------------------------------- + +.. include:: /includes/transactionLifetimeLimitSeconds-parameter.rst + General Changes ---------------