Skip to content

Commit d507471

Browse files
author
Dave Cuthbert
authored
DOCS-15386 server parameter update (#1987)
* DOCS-15386 server parameter update * Staging updates * Staging updates * Staging updates * Review feedback * Review feedback * Review feedback
1 parent 7428711 commit d507471

File tree

4 files changed

+54
-20
lines changed

4 files changed

+54
-20
lines changed

source/core/sharded-cluster-shards.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _shards-concepts:
2+
13
======
24
Shards
35
======
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
Starting in MongoDB 5.0, the new server parameter
1+
The server parameter
22
:parameter:`coordinateCommitReturnImmediatelyAfterPersistingDecision`
33
controls when transaction commit decisions are returned to the client.
4-
In previous versions of MongoDB, the :doc:`shard
5-
</core/sharded-cluster-shards>` transaction coordinator waited for all
6-
members to acknowledge a :ref:`multi-document transaction
4+
5+
The parameter was introduced in MongDB 5.0 with a default value of
6+
``true``. In MongoDB 6.1 the default value changes to ``false``.
7+
8+
When ``coordinateCommitReturnImmediatelyAfterPersistingDecision`` is
9+
``false``, the :ref:`shard <shards-concepts>` transaction coordinator
10+
waits for all members to acknowledge a :ref:`multi-document transaction
711
<transactions-atomicity>` commit before returning the commit decision to
812
the client.

source/reference/parameters.txt

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4743,42 +4743,64 @@ Transaction Parameters
47434743

47444744
.. parameter:: coordinateCommitReturnImmediatelyAfterPersistingDecision
47454745

4746-
.. versionadded:: 5.0
4746+
.. versionadded:: 5.0
4747+
4748+
*Updated in version 6.1*
47474749

47484750
*Type*: boolean
47494751

4750-
*Default*: true
4752+
*Default*: false
47514753

47524754
|mongod-only|
47534755

4754-
If ``true``, the :doc:`shard </core/sharded-cluster-shards>`
4755-
transaction coordinator returns a :ref:`multi-document transaction
4756-
<transactions-atomicity>` commit decision to the client as soon as
4757-
the commit is made :term:`durable` with the requested transaction
4758-
:doc:`write concern </reference/write-concern>`. If the client
4759-
requested a write concern that is less than
4756+
Behavior When ``false``
4757+
```````````````````````
4758+
4759+
The :ref:`shard <shards-concepts>` transaction coordinator waits for
4760+
all members to acknowledge the decision to either commit or cancel a
4761+
:ref:`multi-document transaction <transactions-atomicity>` before
4762+
returning the result to the client.
4763+
4764+
Behavior When ``true``
4765+
``````````````````````
4766+
4767+
The shard transaction coordinator returns a :ref:`multi-document
4768+
transaction <transactions-atomicity>` commit decision to the client
4769+
as soon as the decision is made :term:`durable` with the requested
4770+
transaction :ref:`write concern <write-concern>`.
4771+
4772+
If the client requested a write concern that is less than
47604773
:writeconcern:`"majority"`, the commit may roll back after the
47614774
decision is returned to the client.
47624775

4763-
If ``false``, the :doc:`shard </core/sharded-cluster-shards>`
4764-
transaction coordinator waits for all members to acknowledge a
4765-
:ref:`multi-document transaction <transactions-atomicity>` commit
4766-
before returning the commit decision to the client.
4776+
Transactions may not have "read your writes" consistency. That is, a
4777+
read operation may not reflect the results of a write operation that
4778+
preceded it. This can happen in the following cases:
4779+
4780+
- A transaction has to write to multiple shards.
4781+
- The read and the earlier write take place in different sessions.
4782+
4783+
:ref:`Causal consistency <causal-consistency>` only guarantees the
4784+
causal relationship of reads and writes that occurr within the same
4785+
session.
4786+
4787+
Example
4788+
```````
47674789

47684790
The following example sets
4769-
:parameter:`coordinateCommitReturnImmediatelyAfterPersistingDecision`
4770-
to ``false``:
4791+
``coordinateCommitReturnImmediatelyAfterPersistingDecision`` to
4792+
``true``:
47714793

47724794
.. code-block:: javascript
47734795

4774-
mongod --setParameter coordinateCommitReturnImmediatelyAfterPersistingDecision=false
4796+
mongod --setParameter coordinateCommitReturnImmediatelyAfterPersistingDecision=true
47754797

47764798
During runtime, you can also set the parameter with the
47774799
:dbcommand:`setParameter` command:
47784800

47794801
.. code-block:: bash
47804802

4781-
db.adminCommand( { setParameter: 1, coordinateCommitReturnImmediatelyAfterPersistingDecision: false } )
4803+
db.adminCommand( { setParameter: 1, coordinateCommitReturnImmediatelyAfterPersistingDecision: true } )
47824804

47834805
.. parameter:: transactionLifetimeLimitSeconds
47844806

source/release-notes/6.1-compatibility.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ series <manual-timeseries-collection>` bucket collection namespace
3535
If you are upgrading to MongoDB 6.1 from a prior version, you must drop
3636
all views which are created on ``system.buckets`` collections.
3737

38+
Server Parameters
39+
-----------------
40+
41+
Starting in MongoDB 6.1, the default value for
42+
:parameter:`coordinateCommitReturnImmediatelyAfterPersistingDecision` is
43+
``false``.
3844

3945
No Automatic Chunk Splitting
4046
----------------------------

0 commit comments

Comments
 (0)