-
Notifications
You must be signed in to change notification settings - Fork 245
DRIVERS-2782 Allow variable access to snapshotTimeout #1870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bc87947
2a5829f
ecc49a5
8f2f55a
66939d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -270,10 +270,20 @@ Snapshot sessions tests require server of version 5.0 or higher and replica set | |
|
|
||
| Snapshot sessions tests require server of version 5.0 or higher and replica set or a sharded cluster deployment. | ||
|
|
||
| - Start a session by calling `startSession` on with `snapshot = false`. | ||
| - Start a session by calling `startSession` with `snapshot = false`. | ||
|
|
||
| Drivers SHOULD implement one of the following approaches: | ||
|
|
||
| **Approach 1: Validation (preferred if idiomatic)** | ||
|
|
||
| - Try to access the session's snapshot time. | ||
| - Assert that a client side error was raised. | ||
|
|
||
| **Approach 2: Ensure Read-Only (if error-returning getters are not idiomatic)** | ||
|
|
||
| - Attempt to mutate the session's `snapshotTime` field through any publicly accessible API. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this statement conflicts with requirement of immutability?
Why would we have any public API to mutate the value? Or we are talking about a languages with no technical ability to make the field readonly? |
||
| - Assert that the original session's `snapshotTime` remains unchanged. | ||
|
|
||
| ## Changelog | ||
|
|
||
| - 2025-09-25: Added tests for snapshotTime. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can say this is not a 2 approaches, this is simply 2 requirements:
snapshot = false(or return some special "Invalid" value if throwing is not an option).