summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordi Serra Torrens <jordi.serra-torrens@mongodb.com>2021-03-18 17:20:33 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-19 08:46:12 +0000
commit87e14fa4bd8df77de512cdb85b72fa89abca353f (patch)
tree86244ec15dc534a8dca3170b8164baed47357bf9
parentb0e48211b3cbda845bd18c3283fe0d5f5dcd98c6 (diff)
downloadmongo-87e14fa4bd8df77de512cdb85b72fa89abca353f.tar.gz
SERVER-55307: Complete TODO listed in SERVER-53539
-rw-r--r--jstests/sharding/resharding_replicate_updates_as_insert_delete.js21
1 files changed, 4 insertions, 17 deletions
diff --git a/jstests/sharding/resharding_replicate_updates_as_insert_delete.js b/jstests/sharding/resharding_replicate_updates_as_insert_delete.js
index 8bfbff8b259..3756597f082 100644
--- a/jstests/sharding/resharding_replicate_updates_as_insert_delete.js
+++ b/jstests/sharding/resharding_replicate_updates_as_insert_delete.js
@@ -43,23 +43,10 @@ reshardingTest.withReshardingInBackground( //
],
},
(tempNs) => {
- // Wait for cloning to have finished on both recipient shards to know that the donor shards
- // have begun including the "destinedRecipient" field in their oplog entries. It would
- // technically be sufficient to only wait for cloning to have *started*, but querying the
- // temporary resharding collection through mongos may cause the RecipientStateMachine to
- // never be constructed on recipientShardNames[0].
- //
- // TODO SERVER-53539: Replace the assert.soon() with the following code.
- //
- // const tempColl = mongos.getCollection(tempNs);
- // assert.soon(() => tempColl.findOne(docToUpdate) !== null);
- assert.soon(() => {
- const coordinatorDoc = mongos.getCollection("config.reshardingOperations").findOne({
- ns: testColl.getFullName()
- });
-
- return coordinatorDoc !== null && coordinatorDoc.state === "applying";
- });
+ // Wait for cloning to have at least started on the recipient shards to know that the donor
+ // shards have begun including the "destinedRecipient" field in their oplog entries.
+ const tempColl = mongos.getCollection(tempNs);
+ assert.soon(() => tempColl.findOne(docToUpdate) !== null);
assert.commandFailedWithCode(
testColl.update({_id: 0, x: 2, s: 2}, {$set: {y: 10}}),