[SERVER-33516] make _configsvrCreateCommand take the database distlock to prevent concurrent movePrimary Created: 27/Feb/18  Updated: 29/Oct/23  Resolved: 06/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-30402 createCollection on mongos can create... Closed
Related
is related to SERVER-35226 now that createCollection and createD... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-03-12
Participants:

 Description   

Originally, I was thinking _configsvrCreateCommand, _configsvrDropCollection, and _configsvrDropDatabase should send the dbVersion when targeting the primary shard, since a concurrent movePrimary could happen.

Then I realized _configsvrDropCollection and _configsvrDropDatabase already take a database distlock, which movePrimary also takes, and therefore it's not possible for a movePrimary to happen concurrently with these.

So, the easiest thing is to make _configsvrCreateCommand, which targets the primary shard to place the new collection on, also take the database distlock, probably around here.



 Comments   
Comment by Githook User [ 06/Mar/18 ]

Author:

{'email': 'golden.janna@gmail.com', 'name': 'jannaerin', 'username': 'jannaerin'}

Message: SERVER-33516 Make _configsvrCreateCollection take the db distlock to prevent conncurrent movePrimary
Branch: master
https://github.com/mongodb/mongo/commit/5da505eb1c4f81cbaa22860fd2a9453f10e81a62

Generated at Thu Feb 08 04:33:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.