Skip to content

Commit f6d2caa

Browse files
authored
DOCSP-48501 add casual consistency section (#1047)
* add casual consistency section: * change find to findone
1 parent 6e51000 commit f6d2caa

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

source/crud/transactions.txt

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,44 @@ ACID transactions </basics/acid-transactions>`.
4747
Operations </core/transactions/#transactions-and-operations>` section in
4848
the Server manual.
4949

50-
In MongoDB, multi-document transactions run within a **client session**.
51-
A client session is a grouping of related read or write operations that
52-
you want to execute sequentially. We recommend you reuse
53-
your client for multiple sessions and transactions instead of
54-
instantiating a new client each time.
55-
56-
When combined with ``majority`` read and
57-
write concerns, the driver guarantees causal consistency between the
58-
operations. To learn more, see :manual:`Client Sessions and Causal Consistency Guarantees
59-
</core/read-isolation-consistency-recency/#client-sessions-and-causal-consistency-guarantees>` in the
60-
Server manual.
61-
6250
Learn more about how to use the driver to perform multi-document
6351
transactions in the following sections of this guide:
6452

6553
- :ref:`Transaction APIs <nodejs-transaction-apis>`
6654
- :ref:`Transaction Options <nodejs-transaction-settings>`
6755
- :ref:`Transaction Errors <nodejs-transaction-errors>`
6856

57+
.. _nodejs-causal-consistency:
58+
59+
Causal Consistency
60+
~~~~~~~~~~~~~~~~~~
61+
62+
.. sharedinclude:: dbx/causal-consistency.rst
63+
64+
.. replacement:: insert-one-method
65+
66+
``insertOne()``
67+
68+
.. replacement:: update-one-method
69+
70+
``updateOne()``
71+
72+
.. replacement:: find-one-method
73+
74+
``findOne()``
75+
76+
.. replacement:: delete-one-method
77+
78+
``deleteOne()``
79+
80+
.. replacement:: majority-rc
81+
82+
``majority``
83+
84+
.. replacement:: majority-wc
85+
86+
``majority``
87+
6988
.. _nodejs-transaction-apis:
7089

7190
Transaction APIs

0 commit comments

Comments
 (0)