diff options
author | Alex Taskov <alex.taskov@mongodb.com> | 2021-04-02 13:45:21 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-02 18:36:20 +0000 |
commit | d7413e1de2cfcf71de7c33af791ffaa6940fbdf8 (patch) | |
tree | a901c7bcfd28069b5ea94d546f97219ecc88ae3a /jstests | |
parent | 99508d4e4008cb139f33b6401d0eb9f4fc658099 (diff) | |
download | mongo-d7413e1de2cfcf71de7c33af791ffaa6940fbdf8.tar.gz |
SERVER-55306 Integrate CancelableOperationContext into ReshardingCoordinator
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/resharding_abort_command.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/jstests/sharding/resharding_abort_command.js b/jstests/sharding/resharding_abort_command.js index 10752c7a118..db2f1b61136 100644 --- a/jstests/sharding/resharding_abort_command.js +++ b/jstests/sharding/resharding_abort_command.js @@ -205,6 +205,27 @@ const runAbortWithFailpoint = (failpointName, failpointNodeType, abortLocation, ], }, () => { + // TODO (SERVER-54704): Remove this call once it's no longer necessary to wait for + // participant machines to be set up to abort the reshardCollection command. + assert.soon(() => { + for (let donor of reshardingTest.donorShardNames) { + const donorConn = new Mongo(topology.shards[donor].primary); + const donorDoc = + donorConn.getCollection('config.localReshardingOperations.donor').findOne({ + ns: originalCollectionNs + }); + return donorDoc != null; + } + + for (let recipient of reshardingTest.recipientShardNames) { + const recipientConn = new Mongo(topology.shards[recipient].primary); + const recipientDoc = + recipientConn.getCollection('config.localReshardingOperations.recipient') + .findOne({ns: originalCollectionNs}); + return recipientDoc != null; + } + }); + if (executeAtStartOfReshardingFn) { jsTestLog(`Executing the start-of-resharding fn`); executeAtStartOfReshardingFn( |