[SERVER-31296] Review mongo shell implementation of sessions, causal consistency, and retryable writes Created: 28/Sep/17  Updated: 30/Oct/23  Resolved: 09/Nov/17

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.6.0-rc4

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 2
Labels: sharding36-passthrough-testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-10955 Docs for SERVER-31296: Review mongo s... Closed
Related
is related to SERVER-30679 Integrate causalConsistency into mong... Closed
is related to SERVER-30686 Integrate retryWrites into mongo shel... Closed
Backwards Compatibility: Fully Compatible
Sprint: TIG 2017-10-23, TIG 2017-11-13
Participants:

 Description   

We should attempt to have the mongo shell adhere to the Driver team's specifications. For example, the SessionOptions object shouldn't expose any setters.



 Comments   
Comment by Githook User [ 09/Nov/17 ]

Author:

{'name': 'Max Hirschhorn', 'username': 'visemet', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-31296 Update sessions, causal, and retryable in the mongo shell.

  • Removes the initialClusterTime and initialOperationTime session
    options.
  • Enables causal consistency by default when using an explicit
    session.
  • Adds a --retryWrites command line option to the mongo shell for
    enabling retryable writes in the mongo shell. The retryWrites
    options to SessionOptions is left for convenience with testing.
  • Renames setClusterTime() to advanceClusterTime(), and adds a
    corresponding advanceOperationTime() method to DriverSession.
  • Enables assigning transaction numbers for write commands where
    ordered=false.
  • Prevents the mongo shell from sending afterClusterTime or assigning
    transaction numbers when talking to a stand-alone mongod.
  • Prevents the mongo shell from assigning transaction numbers when
    using an unacknowledged (w=0) writeConcern.
  • Changes DBClientRS to re-discover the current primary of the replica
    set when it receives an error code representing "not master" in
    addition to an error message representing "not master".
Comment by A. Jesse Jiryu Davis [ 03/Oct/17 ]

Let me know if you have any questions about the specs and how drivers are implementing them. There were dramatic changes to the sessions API, as you see.

Generated at Thu Feb 08 04:26:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.