diff options
author | Jason Chan <jason.chan@mongodb.com> | 2021-06-04 19:30:04 +0000 |
---|---|---|
committer | Jason Chan <jason.chan@mongodb.com> | 2021-06-28 14:20:34 +0000 |
commit | 6281048759c0e52ad0dac35bcd121effd9f127c3 (patch) | |
tree | f1a2971da602c6c52aabc681716779791923a2bd | |
parent | 0ad62f387aad9a4b91683512f1ad6c3e91965eab (diff) | |
download | mongo-6281048759c0e52ad0dac35bcd121effd9f127c3.tar.gz |
SERVER-57453 run_validate_collections.js should pass "fromConfigServer: true" when finishing FCV transition from last-lts to last-continuous.
(cherry picked from commit 30b4d64256b6aacc20633aee904634c9f59d96d8)
-rw-r--r-- | jstests/hooks/run_validate_collections.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/hooks/run_validate_collections.js b/jstests/hooks/run_validate_collections.js index 8f1445d6e32..b13898c1308 100644 --- a/jstests/hooks/run_validate_collections.js +++ b/jstests/hooks/run_validate_collections.js @@ -56,11 +56,16 @@ if (requiredFCV) { originalFCV = adminDB.system.version.findOne({_id: 'featureCompatibilityVersion'}); if (originalFCV.targetVersion) { + let cmd = {setFeatureCompatibilityVersion: originalFCV.targetVersion}; + if (originalFCV.version === lastLTSFCV && originalFCV.targetVersion === lastContinuousFCV) { + // We are only able to call 'setFeatureCompatibilityVersion' to transition from last-lts + // to last-continuous with 'fromConfigServer: true'. + cmd.fromConfigServer = true; + } // If a previous FCV upgrade or downgrade was interrupted, then we run the // setFeatureCompatibilityVersion command to complete it before attempting to set the // feature compatibility version to 'requiredFCV'. - assert.commandWorked( - adminDB.runCommand({setFeatureCompatibilityVersion: originalFCV.targetVersion})); + assert.commandWorked(adminDB.runCommand(cmd)); checkFCV(adminDB, originalFCV.targetVersion); } |