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

Make cluster create commands yield sessions before running commands against the config shard

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Cluster Scalability 2023-11-27

      After PM-635, a mongod can have both shard role and router role. For a mongod acting as a router for some transaction that performs an insert against some non-existing database, the implicit database creation can hang if the mongod is also the configsvr primary and shardsvr primary for some shard.  

      1. While executing the cluster insert, the mongod acting as a router checks out the session for the transaction. It later finds out that it needs to implicitly create the database so it runs _configsvrCreateDatabase against the config primary (which is itself).
      2. While executing _configsvrCreateDatabase, the mongod tries to check out the session but couldn't because the session was checked out by the opCtx for the insert command from step 1. 

      The proposal here is to make ShardRemote to yield the session here and unyield the session here just like what we made the AsyncRequestSender do.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: