Skip to content

Commit eda705c

Browse files
committed
DRIVERS-1819 Send readConcern with all commands even writes
1 parent 8139b0c commit eda705c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

source/sessions/snapshot-sessions.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ Snapshot Reads Specification
33
============================
44

55
:Spec Title: Snapshot Reads Specification (See the registry of specs)
6-
:Spec Version: 1.1
6+
:Spec Version: 1.2
77
:Author: Boris Dogadov
88
:Advisors: Jeff Yemin, A. Jesse Jiryu Davis, Judah Schvimer
99
:Status: Draft (Could be Draft, Accepted, Rejected, Final, or Replaced)
1010
:Type: Standards
1111
:Minimum Server Version: 5.0
12-
:Last Modified: 15-Jun-2021
12+
:Last Modified: 29-Jun-2021
1313

1414
.. contents::
1515

@@ -192,6 +192,7 @@ Server Errors
192192
=============
193193
1. The server may reply to read commands with a ``SnapshotTooOld`` error if the client's ``atClusterTime`` value is not available in the server's history.
194194
2. The server will return ``InvalidOptions`` error if both ``atClusterTime`` and ``afterClusterTime`` options are set to true.
195+
3. The server will return ``InvalidOptions`` error if the command does not support readConcern.level "snapshot".
195196

196197
Snapshot read commands
197198
======================
@@ -211,7 +212,7 @@ by specifying ``readConcern`` with ``snapshot`` level field, and store it as ``s
211212
}
212213
}
213214
214-
For subsequent reads from same snapshot driver MUST send the ``snapshotTime`` saved in
215+
For subsequent reads in the same session, the driver MUST send the ``snapshotTime`` saved in
215216
the ``ClientSession`` as the value of the ``atClusterTime`` field of the
216217
``readConcern`` with ``snapshot`` level field:
217218

@@ -233,6 +234,12 @@ Lists of commands that support snapshot reads:
233234
2. aggregate
234235
3. distinct
235236

237+
Sending readConcern to the server on all commands
238+
=================================================
239+
240+
Drivers MUST set the readConcern ``level`` and ``atClusterTime`` fields (as
241+
outlined above) on all commands in a snapshot session.
242+
236243
Requires MongoDB 5.0+
237244
=====================
238245

@@ -277,3 +284,4 @@ Changelog
277284

278285
:2021-06-15: Initial version.
279286
:2021-06-28: Raise client side error on < 5.0.
287+
:2021-06-29: Send readConcern with all snapshot session commands.

0 commit comments

Comments
 (0)