@@ -55,10 +55,10 @@ Causal Consistency
55
55
56
56
MongoDB enables **causal consistency** in client sessions.
57
57
The causal consistency model guarantees that operations within a session
58
- run in a causal order. Additionally, clients observe results that
59
- are consistent with the causal relationships, or the dependencies between
60
- operations. If you perform a series of operations where one operation
61
- logically depends on the result of another, any subsequent
58
+ run in a causal order. Clients observe results that are consistent
59
+ with the causal relationships, or the dependencies between
60
+ operations. For example, if you perform a series of operations where
61
+ one operation logically depends on the result of another, any subsequent
62
62
reads reflect the dependent relationship.
63
63
64
64
The following table describes the guarantees that causally
@@ -79,12 +79,20 @@ consistent sessions provide:
79
79
a preceding read operation.
80
80
81
81
* - Monotonic writes
82
- - The driver runs write operations that logically must precede other write operations
83
- before these dependent writes.
82
+ - If a write operation must precede other write operations, the driver
83
+ runs this write operation first.
84
+
85
+ For example, if you call ``insertOne()`` to insert a document, then call
86
+ ``updateOne()`` to modify the inserted document, the driver runs the
87
+ insert operation first.
84
88
85
89
* - Writes follow reads
86
- - The driver runs write operations that logically must follow other read operations
87
- after these reads.
90
+ - If a write operation must follow other read operations, the driver runs
91
+ the read operations first.
92
+
93
+ For example, if you call ``find()`` to retrieve a document, then call
94
+ ``deleteOne()`` to delete the retrieved document, the driver runs the find
95
+ operation first.
88
96
89
97
In a causally consistent session, MongoDB ensures a
90
98
causal relationship between the following operations:
0 commit comments