diff options
author | Didier Nadeau <didier.nadeau@mongodb.com> | 2022-06-15 18:01:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-15 20:18:42 +0000 |
commit | bfd0810609bf8213c92d004313b87a68b3b66981 (patch) | |
tree | 5ea07d5e26fc9148eeb8831c4efc119de14f3617 /jstests | |
parent | fecef7a1f75e196a24715fabb0721124e71e170b (diff) | |
download | mongo-bfd0810609bf8213c92d004313b87a68b3b66981.tar.gz |
SERVER-66705 Move aborting index builds out of critical section
Diffstat (limited to 'jstests')
5 files changed, 6 insertions, 13 deletions
diff --git a/jstests/libs/override_methods/inject_tenant_prefix.js b/jstests/libs/override_methods/inject_tenant_prefix.js index 92749a1b9de..2d46f138291 100644 --- a/jstests/libs/override_methods/inject_tenant_prefix.js +++ b/jstests/libs/override_methods/inject_tenant_prefix.js @@ -435,7 +435,7 @@ function convertServerConnectionStringToURI(input) { * that there is only one such operation. */ function getOperationStateDocument(conn) { - const collection = isShardSplitPassthrough() ? "tenantSplitDonors" : "tenantMigrationDonors"; + const collection = isShardSplitPassthrough() ? "shardSplitDonors" : "tenantMigrationDonors"; const filter = isShardSplitPassthrough() ? {tenantIds: TestData.tenantIds} : {tenantId: TestData.tenantId}; const findRes = assert.commandWorked( diff --git a/jstests/serverless/libs/basic_serverless_test.js b/jstests/serverless/libs/basic_serverless_test.js index bba2a651cc7..6017c17c756 100644 --- a/jstests/serverless/libs/basic_serverless_test.js +++ b/jstests/serverless/libs/basic_serverless_test.js @@ -347,7 +347,7 @@ class BasicServerlessTest { /* * Wait for state document garbage collection by polling for when the document has been removed - * from the tenantSplitDonors namespace, and all access blockers have been removed. + * from the 'shardSplitDonors' namespace, and all access blockers have been removed. * @param {migrationId} id that was used for the commitShardSplit command. * @param {tenantIds} tenant ids of the shard split. */ @@ -538,7 +538,7 @@ class BasicServerlessTest { } } -BasicServerlessTest.kConfigSplitDonorsNS = "config.tenantSplitDonors"; +BasicServerlessTest.kConfigSplitDonorsNS = "config.shardSplitDonors"; BasicServerlessTest.DonorState = { kUninitialized: "uninitialized", kBlocking: "blocking", diff --git a/jstests/serverless/shard_split_performance_test.js b/jstests/serverless/shard_split_performance_test.js index cb5d0dd20cb..2633d804dec 100644 --- a/jstests/serverless/shard_split_performance_test.js +++ b/jstests/serverless/shard_split_performance_test.js @@ -8,7 +8,6 @@ load("jstests/serverless/libs/basic_serverless_test.js"); load("jstests/replsets/rslib.js"); const kBlockStart = "Entering 'blocking' state."; -const kAbortingIndex = "Aborting index build for shard split."; const kReconfig = "Applying the split config"; const kWaitForRecipients = "Waiting for recipient to accept the split."; const kEndMsg = "Shard split decision reached"; @@ -82,18 +81,15 @@ function runOneSplit() { assertMigrationState(test.donor.getPrimary(), operation.migrationId, "committed"); const blockTS = extractTs(checkLog.getLogMessage(primary, kBlockStart)); - const abortingTS = extractTs(checkLog.getLogMessage(primary, kAbortingIndex)); const reconfigTS = extractTs(checkLog.getLogMessage(primary, kReconfig)); const waitForRecipientsTS = extractTs(checkLog.getLogMessage(primary, kWaitForRecipients)); const endTS = extractTs(checkLog.getLogMessage(primary, kEndMsg)); const blockDurationMs = endTS - blockTS; - const abortingIndexDurationMs = endTS - abortingTS; const waitForRecipientsDurationMs = endTS - waitForRecipientsTS; const reconfigDurationMs = endTS - reconfigTS; - const splitResult = - {blockDurationMs, abortingIndexDurationMs, reconfigDurationMs, waitForRecipientsDurationMs}; + const splitResult = {blockDurationMs, reconfigDurationMs, waitForRecipientsDurationMs}; jsTestLog(`Performance result of shard split: ${tojson(splitResult)}`); const maximumReconfigDuration = 500; diff --git a/jstests/serverless/shard_split_unblock_reads_and_writes_on_completion.js b/jstests/serverless/shard_split_unblock_reads_and_writes_on_completion.js index ac41ae32af2..bf5dd5be8f6 100644 --- a/jstests/serverless/shard_split_unblock_reads_and_writes_on_completion.js +++ b/jstests/serverless/shard_split_unblock_reads_and_writes_on_completion.js @@ -194,7 +194,7 @@ const kCollName = "testColl"; // Cannot mark the state doc as garbage collectable before the migration commits or aborts. assert.commandFailedWithCode(donorsColl.update({recipientSetName: operation.recipientSetName}, {$set: {expireAt: new Date()}}), - ErrorCodes.IllegalOperation); + ErrorCodes.BadValue); // Can drop the state doc collection but this will not cause all blocked reads and writes to // hang. diff --git a/jstests/serverless/shard_split_write_during_split_stepdown.js b/jstests/serverless/shard_split_write_during_split_stepdown.js index d147f09412b..1670b5b57b3 100644 --- a/jstests/serverless/shard_split_write_during_split_stepdown.js +++ b/jstests/serverless/shard_split_write_during_split_stepdown.js @@ -38,12 +38,9 @@ tenantIds.forEach(id => { [{_id: 0, x: 0}, {_id: 1, x: 1}, {_id: 2, x: 2}], {writeConcern: {w: "majority"}})); }); -const operation = test.createSplitOperation(tenantIds); - const blockingFP = configureFailPoint(donorPrimary.getDB("admin"), "pauseShardSplitAfterBlocking"); - +const operation = test.createSplitOperation(tenantIds); const splitThread = operation.commitAsync(); - blockingFP.wait(); const donorRst = createRstArgs(test.donor); |