[SERVER-30404] movePrimary should take the same (dist)lock as shardCollection to ensure UUID consistency Created: 28/Jul/17  Updated: 30/Oct/23  Resolved: 19/Aug/17

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

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

Backwards Compatibility: Minor Change
Operating System: ALL
Sprint: Sharding 2017-07-31, Sharding 2017-08-21, Sharding 2017-09-11
Participants:

 Description   

movePrimary changes the collection's UUID, since it clones the collection to the new primary shard.

if shardCollection is called concurrently, it may persist the original collection's UUID on the config server, leaving the UUIDs inconsistent between the cloned collection and the config server.



 Comments   
Comment by Githook User [ 22/Aug/17 ]

Author:

{'username': 'hughhan1', 'email': 'hughhan1@gmail.com', 'name': 'Hugh Han'}

Message: SERVER-30404 Fix shardCollection database DistLock to use the collection's database
Branch: master
https://github.com/mongodb/mongo/commit/d42b2459e1f887c2ebf2e0966236e6f2378ad15d

Comment by Githook User [ 19/Aug/17 ]

Author:

{'username': 'hughhan1', 'email': 'hughhan1@gmail.com', 'name': 'Hugh Han'}

Message: SERVER-30404 movePrimary should take the same (dist)lock as shardCollection to ensure UUID consistency
Branch: master
https://github.com/mongodb/mongo/commit/edc1e4f4b291312fd5521adf023256f75a7b2ad0

Comment by Esha Maharishi (Inactive) [ 28/Jul/17 ]

Marked as "minor" backwards-breaking change, since it prevents movePrimary and shardCollection from running concurrently.

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