diff options
author | Christopher Caplinger <christopher.caplinger@mongodb.com> | 2023-05-01 18:59:07 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-01 21:15:13 +0000 |
commit | 8953737584fbcf79988dc6c7e49dad760f86d89d (patch) | |
tree | 130e44a7412f924e770a901f43d3a6d3714ed531 /jstests/serverless | |
parent | 203d3276a12c3caa73a7c2e6eaed5930ec89bf72 (diff) | |
download | mongo-8953737584fbcf79988dc6c7e49dad760f86d89d.tar.gz |
SERVER-76683: Remove use of short election timeout in shard split tests
Diffstat (limited to 'jstests/serverless')
8 files changed, 5 insertions, 24 deletions
diff --git a/jstests/serverless/libs/shard_split_test.js b/jstests/serverless/libs/shard_split_test.js index ec1496c721d..fcb351429a8 100644 --- a/jstests/serverless/libs/shard_split_test.js +++ b/jstests/serverless/libs/shard_split_test.js @@ -355,7 +355,6 @@ export class ShardSplitTest { donorRst, nodeOptions, allowStaleReadsOnDonor = false, - initiateWithShortElectionTimeout = false } = {}) { nodeOptions = nodeOptions || {}; if (quickGarbageCollection) { @@ -372,11 +371,7 @@ export class ShardSplitTest { } else { this.donor = new ReplSetTest({name: "donor", nodes: 3, serverless: true, nodeOptions}); this.donor.startSet(); - if (initiateWithShortElectionTimeout) { - this.initiateWithShortElectionTimeout(); - } else { - this.donor.initiate(); - } + this.donor.initiate(); } this.recipientTagName = recipientTagName; @@ -384,13 +379,6 @@ export class ShardSplitTest { this.recipientNodes = []; } - initiateWithShortElectionTimeout() { - let config = this.donor.getReplSetConfig(); - config.settings = config.settings || {}; - config.settings["electionTimeoutMillis"] = 500; - this.donor.initiate(config); - } - /* * Removes and stops the recipient nodes and then stops the donor nodes. * @param {shouldRestart} indicates whether stop() is being called with the intent to call diff --git a/jstests/serverless/shard_split_concurrent_writes_on_donor_aborted.js b/jstests/serverless/shard_split_concurrent_writes_on_donor_aborted.js index 5555eeccb1b..b7c233caf4e 100644 --- a/jstests/serverless/shard_split_concurrent_writes_on_donor_aborted.js +++ b/jstests/serverless/shard_split_concurrent_writes_on_donor_aborted.js @@ -26,7 +26,6 @@ TestData.skipCheckDBHashes = true; const tenantMigrationTest = new ShardSplitTest({ quickGarbageCollection: true, allowStaleReadsOnDonor: true, - initiateWithShortElectionTimeout: true }); const donorPrimary = tenantMigrationTest.getDonorPrimary(); diff --git a/jstests/serverless/shard_split_concurrent_writes_on_donor_blocking.js b/jstests/serverless/shard_split_concurrent_writes_on_donor_blocking.js index d50d55b2aba..eb30f0cdb9e 100644 --- a/jstests/serverless/shard_split_concurrent_writes_on_donor_blocking.js +++ b/jstests/serverless/shard_split_concurrent_writes_on_donor_blocking.js @@ -26,7 +26,6 @@ TestData.skipCheckDBHashes = true; const shardSplitTest = new ShardSplitTest({ quickGarbageCollection: true, allowStaleReadsOnDonor: true, - initiateWithShortElectionTimeout: true, // Increase timeout because blocking in the critical section contributes to operation latency. nodeOptions: {setParameter: {shardSplitTimeoutMS: 100000}} }); diff --git a/jstests/serverless/shard_split_concurrent_writes_on_donor_committed.js b/jstests/serverless/shard_split_concurrent_writes_on_donor_committed.js index f25a9295c5f..b36bd3ab5bd 100644 --- a/jstests/serverless/shard_split_concurrent_writes_on_donor_committed.js +++ b/jstests/serverless/shard_split_concurrent_writes_on_donor_committed.js @@ -25,7 +25,6 @@ TestData.skipCheckDBHashes = true; const test = new ShardSplitTest({ quickGarbageCollection: true, allowStaleReadsOnDonor: true, - initiateWithShortElectionTimeout: true }); const donorPrimary = test.getDonorPrimary(); diff --git a/jstests/serverless/shard_split_drop_state_doc_collection_aborted.js b/jstests/serverless/shard_split_drop_state_doc_collection_aborted.js index ed53375dd4b..8b809987fae 100644 --- a/jstests/serverless/shard_split_drop_state_doc_collection_aborted.js +++ b/jstests/serverless/shard_split_drop_state_doc_collection_aborted.js @@ -78,8 +78,7 @@ function testDroppingStateDocCollections( } jsTest.log("Test dropping donor and recipient state doc collections during a shard split."); -const test = - new ShardSplitTest({quickGarbageCollection: true, initiateWithShortElectionTimeout: true}); +const test = new ShardSplitTest({quickGarbageCollection: true}); const fpName = "abortShardSplitBeforeLeavingBlockingState"; testDroppingStateDocCollections(test, fpName, {dropDonorsCollection: true}); diff --git a/jstests/serverless/shard_split_drop_state_doc_collection_blocking.js b/jstests/serverless/shard_split_drop_state_doc_collection_blocking.js index 5adf3fd00bc..27455aa9892 100644 --- a/jstests/serverless/shard_split_drop_state_doc_collection_blocking.js +++ b/jstests/serverless/shard_split_drop_state_doc_collection_blocking.js @@ -78,8 +78,7 @@ function testDroppingStateDocCollections( } jsTest.log("Test dropping donor and recipient state doc collections during a shard split."); -const test = - new ShardSplitTest({quickGarbageCollection: true, initiateWithShortElectionTimeout: true}); +const test = new ShardSplitTest({quickGarbageCollection: true}); const fpName = "pauseShardSplitAfterBlocking"; testDroppingStateDocCollections(test, fpName, {dropDonorsCollection: true}); diff --git a/jstests/serverless/shard_split_drop_state_doc_collection_committed.js b/jstests/serverless/shard_split_drop_state_doc_collection_committed.js index 41d6d539a75..4940a45bb0e 100644 --- a/jstests/serverless/shard_split_drop_state_doc_collection_committed.js +++ b/jstests/serverless/shard_split_drop_state_doc_collection_committed.js @@ -64,8 +64,7 @@ function testDroppingStateDocCollections( } jsTest.log("Test dropping donor and recipient state doc collections during a shard split."); -const test = - new ShardSplitTest({quickGarbageCollection: true, initiateWithShortElectionTimeout: true}); +const test = new ShardSplitTest({quickGarbageCollection: true}); const fpName = undefined; testDroppingStateDocCollections(test, fpName, {dropDonorsCollection: true}); diff --git a/jstests/serverless/shard_split_drop_state_doc_collection_decision_fullfilled.js b/jstests/serverless/shard_split_drop_state_doc_collection_decision_fullfilled.js index 85afaf7dba1..dcbdf83201e 100644 --- a/jstests/serverless/shard_split_drop_state_doc_collection_decision_fullfilled.js +++ b/jstests/serverless/shard_split_drop_state_doc_collection_decision_fullfilled.js @@ -81,8 +81,7 @@ function testDroppingStateDocCollections( } jsTest.log("Test dropping donor and recipient state doc collections during a shard split."); -const test = - new ShardSplitTest({quickGarbageCollection: true, initiateWithShortElectionTimeout: true}); +const test = new ShardSplitTest({quickGarbageCollection: true}); const fpName = "pauseShardSplitAfterDecision"; testDroppingStateDocCollections(test, fpName, {dropDonorsCollection: true}); |