@@ -137,8 +137,8 @@ class ClientSession {
137137}
138138```
139139
140- The ` snapshotTime ` field MUST be read-only; in APIs that expose ` snapshotTime ` with a getter, attempting to read it on a
141- non-snapshot session MUST raise an error .
140+ On a non-snapshot session, the value of ` snapshotTime ` is undefined. Drivers MUST either raise an error when the
141+ property is accessed or return an unset value .
142142
143143Transactions are not allowed with snapshot sessions. Calling ` session.startTransaction(options) ` on a snapshot session
144144MUST raise an error.
@@ -257,6 +257,12 @@ don't have to be changed. This goal is met by defining a `SessionOptions` field
257257it aligns better with the existing API, and requires minimal API changes. Future extensibility for snapshot reads would
258258be best served by a session-based approach, as no API changes will be required.
259259
260+ ### ` snapshotTimeout ` must be read-only
261+
262+ Allowing callers to mutate ` snapshotTime ` enables misuse patterns where applications overwrite ` snapshotTime ` on an
263+ existing session and then use that session in transactions, combining an inconsistent timestamp with an existing server
264+ session and triggering hard-to-diagnose write conflicts.
265+
260266## Backwards Compatibility
261267
262268The API changes to support snapshot reads extend the existing API but do not introduce any backward breaking changes.
@@ -271,7 +277,7 @@ C# driver will provide the reference implementation. The corresponding ticket is
271277
272278## Changelog
273279
274- - 2025-12-17: Clarify snapshotTime semantics: the field is either read-only or validated .
280+ - 2025-12-18: Make snapshot getter optional .
275281- 2025-09-23: Exposed snapshotTime to applications.
276282- 2024-05-08: Migrated from reStructuredText to Markdown.
277283- 2021-06-15: Initial version.
0 commit comments