-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2020-12-14
-
1
Background
Since a drop from the DonorStateMachine can happen concurrently with a rename from a RecipientStateMachine on the same node, there's no inherent guarantee of ordering. Thus, there can be two scenarios that the drop functionality can find itself in:
- If the renameCollection with dropTarget=true happens first, then the drop would see <database>.<collection> has a UUID of reshardingUUID.
- If the drop happens first, the drop would see <database>.<collection> has a UUID of existingUUID.
Solution
- If the rename happens first and the collection has a UUID of reshardingUUID, this means that the rename already took care of the drop (via dropTarget=true) and the DonorStateMachine can successfully transition to kDone without taking any action.
- If the drop happens first and the collection has a UUID of existingUUID, the DonorStateMachine can drop the local collection. This is fine, because when the rename happens afterwards, the rename's dropTarget piece will end up being a no-op.
- has to be done after
-
SERVER-52802 [Resharding] Remove kDropping from the coordinator and donor
- Closed
- related to
-
SERVER-53224 [Resharding] Verify, in the resharding test fixture, that the collection with the original UUID does not exist on shards after resharding completes
- Closed