[MONGOSH] session object methods are missing

XMLWordPrintableJSON

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

      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
            Reporter:
            Dave Cuthbert (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: