Skip to content

Commit 9073747

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCS-13628 write concern and transactions (#406) (#471)
* DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628 write concern and transactions * DOCS-13628-write-concern-and-transactions * DOCS-13628-write-concern-and-transactions * DOCS-13628-write-concern-and-transactions * DOCS-13628-write-concern-and-transactions Co-authored-by: jason-price-mongodb <[email protected]> Co-authored-by: jason-price-mongodb <[email protected]>
1 parent e6aceed commit 9073747

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

source/core/transactions.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,9 @@ values, including:
693693
.. note::
694694

695695
.. include:: /includes/extracts/transactions-sharded-clusters-commit-writeconcern.rst
696-
696+
697+
.. include:: /includes/write-concern-majority-and-transactions.rst
698+
697699
General Information
698700
-------------------
699701

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
If you specify a :writeconcern:`"majority"` write concern for a
2+
:doc:`multi-document transaction </core/transactions>` and the
3+
transaction fails to replicate to the :ref:`calculated majority
4+
<calculating-majority-count>` of :term:`replica set` members, then the
5+
transaction may not immediately roll back on replica set members.
6+
The replica set will be :term:`eventually consistent <eventual
7+
consistency>`. A transaction is always applied or rolled back on all
8+
replica set members.

source/reference/write-concern.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Write Concern
1616
:class: singlecol
1717

1818

19-
2019
Write concern describes the level of acknowledgment requested from
2120
MongoDB for write operations to a standalone :binary:`~bin.mongod` or
2221
to :doc:`replica sets </replication>` or to :doc:`sharded clusters
@@ -30,6 +29,8 @@ pass the write concern on to the shards.
3029
operation level`. Do not explicitly set the write concern for
3130
individual write operations in a transaction.
3231

32+
.. include:: /includes/write-concern-majority-and-transactions.rst
33+
3334
Starting in MongoDB 4.4, replica sets and sharded clusters support
3435
setting a global default write concern. Operations which do not
3536
specify an explicit write concern inherit the global default
@@ -154,6 +155,8 @@ available:
154155
client can read the result of that write with a
155156
:readconcern:`"majority"` readConcern.
156157

158+
.. include:: /includes/write-concern-majority-and-transactions.rst
159+
157160
See :ref:`wc-ack-behavior` for when :binary:`~bin.mongod` instances
158161
acknowledge the write.
159162

0 commit comments

Comments
 (0)