-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Cluster Scalability
-
ALL
-
v9.0
-
Cluster Scalability Priorities
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
TL;DR An aborted or committed resharding operation can end up restarting on retry if the db-primary shard fails over (or has full restart, like magic restore).
Resharding has two coordinators:
- ReshardCollectionCoordinator: runs on the db-primary shard and sends _configsvrReshardCollection.
- ReshardingCoordinator: runs the config server and does the orchestration.
Due to this structure, the following sequence can happen:
- ReshardCollection starts; ReshardCollectionCoordinator sends _configsvrReshardCollection and waits for its completion
- ReshardingCoordinator begins
- AbortReshardCollection is invoked
- ReshardingCoordinator finishes aborting and removes its state doc
- The db-primary shard fails over before ReshardCollectionCoordinator gets signal from _configsvrReshardCollection.
- On stepup, ReshardCollectionCoordinator re-sends _configsvrReshardCollection.
- This should join the existing ReshardingCoordinator, but it has already been cleaned up.
- With nothing to join, a fresh ReshardingCoordinator instance gets created and runs all the way to a successful commit.
The result is that an operation the user aborted completes anyway, changing the collection's shard key and UUID. Or on the commit case, redo the operation if forceRedistribution is specified.
Note: resharding operations that pass a user-supplied reshardingUUID aren't affected, because they quiesce the state document on abort instead of deleting it, so the retry has a record to dedup against.
- is related to
-
SERVER-62064 Serialize resharding with other DDL operations on stepup
-
- Closed
-
-
SERVER-52760 Implement a pseudo-coordinator for Resharding on the primary shard
-
- Closed
-