summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chan <jason.chan@mongodb.com>2022-04-20 18:56:33 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-20 19:43:33 +0000
commit7001f53ea533b5ca6a7b5bf904a80bb18611523f (patch)
tree6bd70bdcec0b8bea8598b4a18ce1cfa3f3e066dd
parent207489e8d31e30ab0364af5afcaba626d49061a7 (diff)
downloadmongo-7001f53ea533b5ca6a7b5bf904a80bb18611523f.tar.gz
SERVER-65825 Increase fassertOnLockTimeoutForStepUpDown default timeout to 30 seconds
-rw-r--r--jstests/replsets/stepdown_fassert_on_rstl_timeout.js6
-rw-r--r--src/mongo/db/repl/repl_server_parameters.idl3
2 files changed, 6 insertions, 3 deletions
diff --git a/jstests/replsets/stepdown_fassert_on_rstl_timeout.js b/jstests/replsets/stepdown_fassert_on_rstl_timeout.js
index d782b76c266..5838e913840 100644
--- a/jstests/replsets/stepdown_fassert_on_rstl_timeout.js
+++ b/jstests/replsets/stepdown_fassert_on_rstl_timeout.js
@@ -21,7 +21,9 @@ load("jstests/libs/write_concern_util.js");
load("jstests/libs/fail_point_util.js");
var name = "interruptStepDown";
-var replSet = new ReplSetTest({name: name, nodes: 3});
+// Set the fassert timeout to shorter than the default to avoid having a long-running test.
+var replSet = new ReplSetTest(
+ {name: name, nodes: 3, nodeOptions: {setParameter: "fassertOnLockTimeoutForStepUpDown=5"}});
var nodes = replSet.nodeList();
replSet.startSet();
replSet.initiate({
@@ -60,7 +62,7 @@ failPoint.wait();
var stepDownCmd = function() {
jsTestLog("Sending stepdown to primary");
- db.getSiblingDB('admin').runCommand({replSetStepDown: 20, force: true});
+ db.getSiblingDB('admin').runCommand({replSetStepDown: 10, force: true});
};
var stepDowner = startParallelShell(stepDownCmd, primary.port);
diff --git a/src/mongo/db/repl/repl_server_parameters.idl b/src/mongo/db/repl/repl_server_parameters.idl
index 24e940d0f66..73065c53b90 100644
--- a/src/mongo/db/repl/repl_server_parameters.idl
+++ b/src/mongo/db/repl/repl_server_parameters.idl
@@ -613,7 +613,8 @@ server_parameters:
set_at: [ startup, runtime ]
cpp_vartype: AtomicWord<int>
cpp_varname: fassertOnLockTimeoutForStepUpDown
- default: 15
+ # We set the default to 30 seconds explicitly to match sharding's kDefaultConfigCommandTimeout.
+ default: 30
validator:
gte: 0