diff options
author | Brett Nawrocki <brett.nawrocki@mongodb.com> | 2021-09-16 20:28:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-09-21 22:10:12 +0000 |
commit | 31f1068f5273f1dd55378eda3fb4bdc441e0a15e (patch) | |
tree | 534b79539507bfc77a9f3e523b44880fca9318a0 /jstests | |
parent | 14b059e544578774d7f7ee3aacdc6ac47a15bb4c (diff) | |
download | mongo-31f1068f5273f1dd55378eda3fb4bdc441e0a15e.tar.gz |
SERVER-60094 Add shard version to internal write
ReshardingOplogApplicationRules::_applyDelete_inlock() has special logic
to, upon removing a document from the temporary resharding collection,
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. Therefore, call initializeClientRoutingVersions() on this context
to set the version.
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js b/jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js index 723c4c1fc3c..f7360d2430c 100644 --- a/jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js +++ b/jstests/sharding/resharding_secondary_recovers_temp_ns_metadata.js @@ -39,6 +39,13 @@ reshardingTest.withReshardingInBackground( // // recovered from the config server. reshardingTest.stepUpNewPrimaryOnShard(recipientShardNames[0]); assert.commandWorked(sourceCollection.insert({oldKey: 1, newKey: 2})); + + /* TODO SERVER-59721: Enable tests for update and remove + reshardingTest.stepUpNewPrimaryOnShard(recipientShardNames[0]); + assert.commandWorked(sourceCollection.update({oldKey: 1, newKey: 2}, {$set: {extra: 3}})); + + reshardingTest.stepUpNewPrimaryOnShard(recipientShardNames[0]); + assert.commandWorked(sourceCollection.remove({oldKey: 1, newKey: 2}, {justOne: true})); */ }); reshardingTest.teardown(); |