summaryrefslogtreecommitdiff
path: root/jstests/serverless/shard_split_wait_for_block_timestamp.js
diff options
context:
space:
mode:
authormathisbessamdb <mathis.bessa@mongodb.com>2022-02-22 17:41:57 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-22 18:57:39 +0000
commita40b0d5ba8edc39568870e179cf9acc1a4df2863 (patch)
tree58c6c103eb3a3058db41b01f0c2920ad6ece02b2 /jstests/serverless/shard_split_wait_for_block_timestamp.js
parentc8ec0f4a1587ce3c221d44799cba47553a629274 (diff)
downloadmongo-a40b0d5ba8edc39568870e179cf9acc1a4df2863.tar.gz
SERVER-63817 adding support of forgetShardSplit cmd to the shard_split_wait_for_block_timestamps
Diffstat (limited to 'jstests/serverless/shard_split_wait_for_block_timestamp.js')
-rw-r--r--jstests/serverless/shard_split_wait_for_block_timestamp.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/jstests/serverless/shard_split_wait_for_block_timestamp.js b/jstests/serverless/shard_split_wait_for_block_timestamp.js
index 0416a9f0261..2b95fedfa37 100644
--- a/jstests/serverless/shard_split_wait_for_block_timestamp.js
+++ b/jstests/serverless/shard_split_wait_for_block_timestamp.js
@@ -62,9 +62,8 @@ const awaitFirstSplitOperation = startParallelShell(
awaitFirstSplitOperation();
assertMigrationState(donorPrimary, firstOperationId, "aborted");
-jsTestLog(`Removing state document: ${tojson(firstOperationId)}`);
-// TODO(SERVER-62366): use `forgetShardSplit` instead of manually deleting the state document.
-assert.commandWorked(cleanupMigrationDocument(donorPrimary, firstOperationId));
+jsTestLog(`Running forgetShardSplit command: ${tojson(firstOperationId)}`);
+assert.commandWorked(adminDb.runCommand({forgetShardSplit: 1, migrationId: firstOperationId}));
jsTestLog("Restarting replication on recipient nodes, and running new split operation");
test.recipientNodes.forEach(node => restartServerReplication(node));
@@ -89,8 +88,8 @@ const awaitSecondSplitOperation = startParallelShell(
awaitSecondSplitOperation();
assertMigrationState(donorPrimary, secondOperationId, "committed");
-jsTestLog("Running forgetShardSplit command");
-assert.commandWorked(adminDb.runCommand({forgetShardSplit: 1, migrationId}));
+jsTestLog(`Running forgetShardSplit command: ${tojson(secondOperationId)}`);
+assert.commandWorked(adminDb.runCommand({forgetShardSplit: 1, migrationId: secondOperationId}));
test.stop();
})();