[SERVER-81969] Make cluster create commands yield sessions before running commands against the config shard Created: 09/Oct/23  Updated: 14/Nov/23  Resolved: 14/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-81968 Make mongod dispatch commands through... Closed
Backwards Compatibility: Fully Compatible
Sprint: Cluster Scalability 2023-11-27
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 14/Nov/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-81969 Make cluster create database commands yield sessions before running commands against the config shard
Branch: master
https://github.com/mongodb/mongo/commit/7a7902cc91413258af1d20349d49bd52ac8cb43b

Generated at Thu Feb 08 06:47:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.