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

Audit re-use of operation contexts in mongos for metadata operations

    • Fully Compatible
    • Sharding 2018-10-22

      A lot of transaction machinery on mongos relies on the operation context to attach transaction options to outgoing requests in the sharding task executor. If mongos re-uses the operation context used to send the client requests to shards to also send metadata operations / refreshes to the config server, it may be attaching transaction options to those requests as well. This could lead to strange behavior, like mongos believing the CSRS is a participant in a transaction, or possibly metadata refreshes being run as single replica set transactions.

      The purpose of this ticket is to figure out where mongos can use the same operation context for client requests and other operations, and to decide how to deal with this.

      An example is in the batch write path where initializing a ChunkManagerTargeter may involve creating a sharded collection through the config server using the same operation context that will eventually send the batch writes.

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

              Created:
              Updated:
              Resolved: