@@ -187,33 +187,40 @@ The following read concern levels are available:
187
187
188
188
* - :readconcern:`"snapshot"`
189
189
190
- - | If the transaction is not part of a :ref:`causally consistent
190
+ - | If a transaction is not part of a :ref:`causally consistent
191
191
session <sessions>`, upon transaction commit with write
192
192
concern :writeconcern:`"majority"`, the transaction operations
193
193
are guaranteed to have read from a snapshot of
194
194
majority-committed data.
195
195
196
- | If the transaction is part of a :ref:`causally consistent
196
+ | If a transaction is part of a :ref:`causally consistent
197
197
session <sessions>`, upon transaction commit with write
198
198
concern :writeconcern:`"majority"`, the transaction operations
199
199
are guaranteed to have read from a snapshot of
200
200
majority-committed data that provides causal consistency with
201
201
the operation immediately preceding the transaction start.
202
202
203
- Availability:
204
- - Read concern :readconcern:`"snapshot"` is only available
205
- for use with multi-document transactions.
206
-
207
- - For transactions on a sharded cluster, if any operation in
208
- the transaction involves a shard that has :ref:`disabled
209
- read concern "majority" <disable-read-concern-majority>`,
210
- you cannot use read concern :readconcern:`"snapshot"` for
211
- the transaction. You can only use read concern
212
- :readconcern:`"local"` or :readconcern:`"majority"` for the
213
- transaction.
214
-
215
-
216
-
203
+ **Availability:**
204
+
205
+ Read concern :readconcern:`"snapshot"` is available for
206
+
207
+ - All read operations inside multi-document transactions with the
208
+ read concern set at the transaction level.
209
+ - The following methods outside of multi-document
210
+ transactions:
211
+
212
+ - :dbcommand:`find`
213
+ - :dbcommand:`aggregate`
214
+ - :dbcommand:`distinct` (on unsharded collections)
215
+
216
+ All other read operations prohibit
217
+ :readconcern:`"snapshot"`.
218
+
219
+ .. important::
220
+
221
+ .. include:: /includes/fact-readConcern-snapshot-disable-majority.rst
222
+
223
+
217
224
218
225
.. include:: /includes/fact-readConcern-most-recent-data-in-node.rst
219
226
@@ -296,14 +303,10 @@ Causally Consistent Sessions and Available Read Concerns
296
303
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297
304
298
305
For operations in a :ref:`causally consistent session
299
- <causal-consistency>`, :readconcern:`"local"` and
300
- :readconcern:`"majority"` levels are available. However, to guarantee
301
- causal consistency, you must use :readconcern:`"majority"`. For
302
- details, see :ref:`causal-consistency`.
303
-
304
- If a multi-document transaction is associated with a causally
305
- consistent session, :readconcern:`"snapshot"` is also available for the
306
- the transaction.
306
+ <causal-consistency>`, :readconcern:`"local"`,
307
+ :readconcern:`"majority"`, and :readconcern:`"snapshot"` levels are
308
+ available. However, to guarantee causal consistency, you must use
309
+ :readconcern:`"majority"`. For details, see :ref:`causal-consistency`.
307
310
308
311
.. _read-concern-operations:
309
312
@@ -402,9 +405,10 @@ The following operations support read concern:
402
405
.. [#distinct]
403
406
404
407
Read concern :readconcern:`"snapshot"` is available only for
405
- multi-document transactions. In a transaction, you cannot use the
406
- ``distinct`` command or its helpers on a sharded collection.
407
-
408
+ certain read operations and for multi-document transactions. In a
409
+ transaction, you cannot use the ``distinct`` command or its helpers
410
+ on a sharded collection.
411
+
408
412
The following write operations can also accept a read concern if part
409
413
of a multi-document transaction:
410
414
@@ -494,10 +498,10 @@ of a multi-document transaction:
494
498
.. [#snapshot]
495
499
496
500
Read concern :readconcern:`"snapshot"` is available only for
497
- multi-document transactions, and for transactions, you set the read
498
- concern at the transaction level. The operations that support
499
- :readconcern:`"snapshot"` correspond to the CRUD operations
500
- available in transactions. For more information, see
501
+ certain read operations and multi-document transactions. For transactions, you
502
+ set the read concern at the transaction level. The transaction
503
+ operations that support :readconcern:`"snapshot"` correspond to the
504
+ CRUD operations available in transactions. For more information, see
501
505
:ref:`transactions-read-concern`.
502
506
503
507
Read Concern not Supported on ``local`` Database
@@ -581,6 +585,13 @@ with causally consistent sessions.
581
585
such as to be consistent with the operations of another client
582
586
session. For an example, see :ref:`causal-consistency-examples`.
583
587
588
+ .. note::
589
+
590
+ It is not possible to specify :ref:`atClusterTime <atClusterTime>` in
591
+ conjunction with ``afterClusterTime``. To use :ref:`atClusterTime
592
+ <atClusterTime>` with read concern `"snapshot"` you have to disable
593
+ :ref:`causally consistent sessions <sessions>`.
594
+
584
595
To satisfy a read request with an ``afterClusterTime`` value of ``T``,
585
596
a :binary:`~bin.mongod` must perform the request after its oplog
586
597
reaches time ``T``. If its oplog has not reached time ``T``, the
0 commit comments