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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: 4.1.5
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14, Sharding 2019-01-28, Sharding 2019-02-11

      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.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: