summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuayu Ouyang <huayu.ouyang@mongodb.com>2021-06-09 15:55:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-10 15:42:31 +0000
commit7f56da83d8ce91fa17bd5687a33747fe34e64cf8 (patch)
treefafcc4ff942fa97e0760e39d23727bd43d5b3ba8
parente2a6ca78b0faed0f9ffde1c026c1ddbe759b31bd (diff)
downloadmongo-7f56da83d8ce91fa17bd5687a33747fe34e64cf8.tar.gz
SERVER-56004 Fix rollback_set_fcv.js where primary hangs when setting FCV after reconfig
-rw-r--r--jstests/replsets/rollback_set_fcv.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/replsets/rollback_set_fcv.js b/jstests/replsets/rollback_set_fcv.js
index e84bc6e77bd..744165cfb34 100644
--- a/jstests/replsets/rollback_set_fcv.js
+++ b/jstests/replsets/rollback_set_fcv.js
@@ -15,6 +15,7 @@
load("jstests/replsets/libs/rollback_test.js");
load('jstests/libs/parallel_shell_helpers.js');
load("jstests/libs/fail_point_util.js");
+load("jstests/replsets/rslib.js");
function setFCV(fcv) {
assert.commandFailedWithCode(db.adminCommand({setFeatureCompatibilityVersion: fcv}),
@@ -37,6 +38,11 @@ function rollbackFCVFromDowngradingOrUpgrading(fromFCV, toFCV) {
// Ensure the cluster starts at the correct FCV.
assert.commandWorked(primary.adminCommand({setFeatureCompatibilityVersion: toFCV}));
+ // Wait until the config has propagated to the other nodes and the primary has learned of it, so
+ // that the config replication check in 'setFeatureCompatibilityVersion' is satisfied. This is
+ // only important since 'setFeatureCompatibilityVersion' is known to implicitly call internal
+ // reconfigs as part of upgrade/downgrade behavior.
+ rollbackTest.getTestFixture().waitForConfigReplication(primary);
jsTestLog("Testing rolling back FCV from {version: " + lastLTSFCV +
", targetVersion: " + fromFCV + "} to {version: " + toFCV + "}");