You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/sessions/snapshot-sessions.rst
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@ Snapshot Reads Specification
3
3
============================
4
4
5
5
:Spec Title: Snapshot Reads Specification (See the registry of specs)
6
-
:Spec Version: 1.1
6
+
:Spec Version: 1.2
7
7
:Author: Boris Dogadov
8
8
:Advisors: Jeff Yemin, A. Jesse Jiryu Davis, Judah Schvimer
9
9
:Status: Draft (Could be Draft, Accepted, Rejected, Final, or Replaced)
10
10
:Type: Standards
11
11
:Minimum Server Version: 5.0
12
-
:Last Modified:15-Jun-2021
12
+
:Last Modified:29-Jun-2021
13
13
14
14
.. contents::
15
15
@@ -192,6 +192,7 @@ Server Errors
192
192
=============
193
193
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.
194
194
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".
195
196
196
197
Snapshot read commands
197
198
======================
@@ -211,7 +212,7 @@ by specifying ``readConcern`` with ``snapshot`` level field, and store it as ``s
211
212
}
212
213
}
213
214
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
215
216
the ``ClientSession`` as the value of the ``atClusterTime`` field of the
216
217
``readConcern`` with ``snapshot`` level field:
217
218
@@ -233,6 +234,12 @@ Lists of commands that support snapshot reads:
233
234
2. aggregate
234
235
3. distinct
235
236
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
+
236
243
Requires MongoDB 5.0+
237
244
=====================
238
245
@@ -277,3 +284,4 @@ Changelog
277
284
278
285
:2021-06-15: Initial version.
279
286
:2021-06-28: Raise client side error on < 5.0.
287
+
:2021-06-29: Send readConcern with all snapshot session commands.
0 commit comments