Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35527

Ignore session information on the embedded version of mongod

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc5, 4.1.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Sharding 2018-06-18

      When requests with a session id are parsed, the id is vivified in the LogicalSessionCache decoration. The embedded storage engine does not set up the LogicalSessionCache (the decoration is a null pointer), so sending a session id to mongoed triggers a segmentation fault when LogicalSessionCache::vivify is called.

      Since session based behavior can't work without the cache, any session information received when there is no LogicalSessionCache should just be ignored, avoiding the crash.

      This is a required change for SERVER-32064, which will change the shell to use implicit sessions, meaning (almost) every request will have a session id. Alternatively, the shell could check the isMaster response it receives when creating a connection and choose not to send session ids when sessions aren't supported (like what drivers do), but this would require more work and could be done as a follow-up or as part of SERVER-33606.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: