[SERVER-30402] createCollection on mongos can create an unreachable collection if movePrimary has been called Created: 28/Jul/17  Updated: 06/Dec/22  Resolved: 01/Mar/18

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

Type: Bug Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-33516 make _configsvrCreateCommand take the... Closed
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

createCollection on mongos does not check for the collection's existence in the cluster; it simply forwards the create command to (what it believes is) the database's primary shard.

If movePrimary has been called from another mongos, this mongos will cause the collection to be created on the wrong (old primary) shard, leaving it unreachable.

I believe once SERVER-30375 is done, this means we will be unable to migrate chunks for this collection onto this shard until the unreachable collection is manually deleted directly from the shard.



 Comments   
Comment by Esha Maharishi (Inactive) [ 01/Mar/18 ]

Closing as a dupe of SERVER-33516, since that ticket will make _configsvrCreateCollection take the database distlock, which will prevent the primary shard from changing while _configsvrCreateCollection is running.

CC janna.golden

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