-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.0.3
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v5.0
-
Sharding 2021-10-04
-
1
ReshardingOplogApplicationRules::_applyDelete_inlock() has special logic to upon removing a document from the temporary resharding collection to move a document from one of the other stash collections (i.e. one associated with a different donor shard) into its place. The runWithTransaction() helper does so by using AlternativeSessionRegion which will construct a separate OperationContext. The write being performed in this separate OperationContext won't have shard version attached for the temporary resharding collection like the original one had. Calling initializeClientRoutingVersions() on the OperationShardingState associated with the separate OperationContext should address the delete on the temporary resharding collection not having a shard version.
See SERVER-59023 for why this is necessary; that this was not already being done was an oversight when implementing that ticket.
- is related to
-
SERVER-54984 Relax invariant in ReshardingOpObserver about temporary resharding collection being sharded
- Closed
-
SERVER-59023 Resharding can fail with NamespaceNotSharded following a primary failover on a recipient shard
- Closed
-
SERVER-52639 Fail resharding operation if new shard key includes array
- Closed