Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1212

[MONGOSH] session object methods are missing

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Iteration Isopod

      Problem Statement/Rationale

      The session options page lists a number of methods that appear to be missing.

      Steps to Reproduce

      test> var session = db.getMongo().startSession()

      test> session.getOptions()
      {}
      test> session.getOptions().getReadPreference()
      TypeError: session.getOptions().getReadPreference is not a function
      test> session.getOptions().getReadConcern()
      TypeError: session.getOptions().getReadConcern is not a function
      test> session.getOptions().getWriteConcern()
      TypeError: session.getOptions().getWriteConcern is not a function
      test> session.getOptions().shouldRetryWrites()
      TypeError: session.getOptions().shouldRetryWrites is not a function

      Expected Results

      The methods work as they did in the legacy mongo shell

      Actual Results

      The methods are unsupported

      Additional Notes

      Per Anna in Slack, setWriteConcern() probably cannot be implemented.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: