-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
Acceptance Criteria
- Pull in all the new spec tests and check for failures.
- Implement the base snapshot sessions functionality according to the spec
- Introduce `snapshot` session option for use in `client.startSession` (optional, default false)
- Driver should raise error if `snapshot` and `causalConsistency` are both set to `true`
- Should add unit test
- Driver should raise error if `snapshot` is `true` and `session.startTransaction` is invoked
- Should add unit test
- ReadConcernLevel enum updated to include "snapshot"
- NOTE: this already exists in the driver
- Implement snapshot functionality for the following commands: `find`, `aggregate`, `distinct`
- Specify read concern `level: 'snapshot'` with the command; save the `atClusterTime` returned by 5.0+ servers for the first find/aggregate/distinct operation in a private property `snapshotTime` of the `ClientSession` object
- Pass that `snapshotTime` in the `atClusterTime` field of the `readConcern` field
for subsequent snapshot read operations (for find/aggregate/distinct commands).
- Newly added spec tests should pass
Not required for this ticket: