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

killAllSessions can kill itself if the command body contains a lsid field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.1.5
    • Fix Version/s: 4.1.8
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14, Sharding 2019-01-28, Sharding 2019-02-11

      Description

      The command in mongos kills all sessions and then sends the same killAllSessions to all shards. If the matcher is empty and the killAllSessions command has a lsid field, it will also end up calling killOp on itself since it is technically using a session. The remote killAllSessions call to every shard will still succeed since it is using a different operation context than the original command, but the original command will get interrupted early and will not wait for the remote commands to finish.

      This is kind of problematic for drivers (and mongo shell) since every request is using an implicit session. As a result, there is currently no reliable way to synchronously block and wait for killAllSessions to complete before proceeding.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: