Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3392

Implement Snapshot Read functionality

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed

      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`
          1. 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
          2. 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:

      • Raising a client-side error when attempting to use a snapshot session with server versions < 5.0 (NODE-3394)
      • Sending readconcern with `snapshot` and `atCluserTime` properties on all snapshot session operations, even writes (NODE-3393)

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            alexander.golin@mongodb.com Alexander Golin (Inactive)
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: