@@ -27,6 +27,10 @@ transaction is committed. If any operation in the transaction returns an
27
27
error, the driver cancels the transaction and discards all data changes
28
28
before they ever become visible.
29
29
30
+ In MongoDB, transactions run within logical **sessions**. A
31
+ session is a grouping of related read or write operations that you
32
+ intend to run sequentially.
33
+
30
34
When using the {+driver-short+}, you can create a new session from a
31
35
``MongoClient`` instance as a ``ClientSession`` type. We recommend that you reuse
32
36
your client for multiple sessions and transactions instead of
@@ -47,10 +51,6 @@ instantiating a new client each time.
47
51
Causal Consistency
48
52
~~~~~~~~~~~~~~~~~~
49
53
50
- In MongoDB, transactions run within logical **sessions**. A
51
- session is a grouping of related read or write operations that you
52
- intend to run sequentially.
53
-
54
54
MongoDB enables **causal consistency** in client sessions, which allows
55
55
you to execute operations in an :website:`ACID transaction </basics/acid-transactions>`.
56
56
The causal consistency model guarantees that operations within a session
@@ -71,8 +71,8 @@ causal relationship between the following operations:
71
71
To learn more about the concepts mentioned in this section, see the
72
72
following {+mdb-server+} manual entries:
73
73
74
- - :manual:`Server Sessions </reference/server-sessions/>`
75
74
- :manual:`Causal Consistency </core/read-isolation-consistency-recency/#causal-consistency>`
75
+ - :manual:`Causal Consistency and Read and Write Concerns </core/causal-consistency-read-write-concerns/>`
76
76
77
77
Methods
78
78
-------
0 commit comments