summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chan <jason.chan@mongodb.com>2020-09-28 18:59:02 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-30 19:37:36 +0000
commitf393c88a92010d406f063ca4fcc866f1988bf84d (patch)
tree35eb92ba46aaddf824a10866eb82239db2c8320f
parentc6316be1df28838a51f257abae42f43083e72d25 (diff)
downloadmongo-f393c88a92010d406f063ca4fcc866f1988bf84d.tar.gz
SERVER-49802 Update FCV constants to recognize 4.8 as latest
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_multiversion.yml1
-rw-r--r--buildscripts/resmokelib/multiversionconstants.py4
-rw-r--r--etc/evergreen.yml4
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js16
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js2
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/rsm_topology_change_fcv.js2
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js25
-rw-r--r--jstests/multiVersion/verify_versions_test.js6
-rw-r--r--jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js4
-rw-r--r--jstests/replsets/awaitable_ismaster_fcv_change.js4
-rw-r--r--src/mongo/db/commands/feature_compatibility_version_parser.h20
-rw-r--r--src/mongo/db/server_options.h24
-rw-r--r--src/mongo/db/startup_recovery.cpp5
-rw-r--r--src/mongo/db/wire_version.h5
-rw-r--r--src/mongo/rpc/protocol_test.cpp9
-rw-r--r--src/mongo/shell/feature_compatibility_version.js6
-rw-r--r--src/mongo/shell/servers.js2
-rw-r--r--src/mongo/shell/shardingtest.js3
20 files changed, 100 insertions, 44 deletions
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml b/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml
index f371ebd8a68..e951830f3cc 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml
@@ -6,6 +6,7 @@ selector:
exclude_with_any_tags:
- multiversion_incompatible
- requires_fcv_47
+ - requires_fcv_48
- backport_required_multiversion
- replica_sets_multiversion_backport_required_multiversion
exclude_files:
diff --git a/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml b/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml
index c16792ff600..23272f5765c 100644
--- a/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml
@@ -8,6 +8,7 @@ selector:
exclude_with_any_tags:
- multiversion_incompatible
- requires_fcv_47
+ - requires_fcv_48
- backport_required_multiversion
- sharding_last_lts_mongos_and_mixed_shards_backport_required_multiversion
exclude_files:
diff --git a/buildscripts/resmokeconfig/suites/sharding_multiversion.yml b/buildscripts/resmokeconfig/suites/sharding_multiversion.yml
index cde548fe551..0ca05d23d71 100644
--- a/buildscripts/resmokeconfig/suites/sharding_multiversion.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_multiversion.yml
@@ -8,6 +8,7 @@ selector:
exclude_with_any_tags:
- multiversion_incompatible
- requires_fcv_47
+ - requires_fcv_48
- backport_required_multiversion
- replica_sets_multiversion_backport_required_multiversion
exclude_files:
diff --git a/buildscripts/resmokelib/multiversionconstants.py b/buildscripts/resmokelib/multiversionconstants.py
index e83f01e7d7c..792a4214b67 100644
--- a/buildscripts/resmokelib/multiversionconstants.py
+++ b/buildscripts/resmokelib/multiversionconstants.py
@@ -2,9 +2,9 @@
LAST_LTS_BIN_VERSION = "4.4"
LAST_LTS_FCV = "4.4"
-LATEST_FCV = "4.7"
+LATEST_FCV = "4.8"
LAST_LTS_MONGO_BINARY = "mongo-" + LAST_LTS_BIN_VERSION
LAST_LTS_MONGOD_BINARY = "mongod-" + LAST_LTS_BIN_VERSION
LAST_LTS_MONGOS_BINARY = "mongos-" + LAST_LTS_BIN_VERSION
-REQUIRES_FCV_TAG = "requires_fcv_47"
+REQUIRES_FCV_TAG = "requires_fcv_47,requires_fcv_48"
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 4cf93ebc7cd..f9309c08af4 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1358,7 +1358,7 @@ functions:
--edition $edition \
--platform $platform \
--architecture $architecture \
- --useLatest 4.4
+ --useLatest 4.4 4.7
"execute resmoke tests": &execute_resmoke_tests
command: shell.exec
@@ -10516,7 +10516,7 @@ buildvariants:
- rhel62-small
expansions: &enterprise-rhel-62-64-bit-multiversion
test_flags: >-
- --excludeWithAnyTags=requires_fcv_47,multiversion_incompatible
+ --excludeWithAnyTags=requires_fcv_47,requires_fcv_48,multiversion_incompatible
compile_flags: >-
-j$(grep -c ^processor /proc/cpuinfo)
--ssl
diff --git a/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js b/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js
index e5888c67565..cc64ea70301 100644
--- a/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js
+++ b/jstests/multiVersion/genericSetFCVUsage/do_upgrade_downgrade.js
@@ -153,6 +153,14 @@ let standaloneTest = function(nodeOptions, downgradeVersion) {
checkUniqueIndexFormatVersion(adminDB);
setFCV(adminDB, downgradeFCV);
+ } else {
+ checkFCV(adminDB, lastLTSFCV);
+
+ // Transitioning from last-lts to last-continuous is only allowed when
+ // setFeatureCompatibilityVersion is called with fromConfigServer: true.
+ assert.commandWorked(adminDB.runCommand(
+ {setFeatureCompatibilityVersion: downgradeFCV, fromConfigServer: true}));
+ checkFCV(adminDB, downgradeFCV);
}
// Ensure featureCompatibilityVersion is downgraded and all collections still have UUIDs.
@@ -243,6 +251,14 @@ let replicaSetTest = function(nodeOptions, downgradeVersion) {
// Change featureCompatibilityVersion to downgradeFCV.
setFCV(primaryAdminDB, downgradeFCV);
rst.awaitReplication();
+ } else {
+ checkFCV(primaryAdminDB, lastLTSFCV);
+
+ // Transitioning from last-lts to last-continuous is only allowed when
+ // setFeatureCompatibilityVersion is called with fromConfigServer: true.
+ assert.commandWorked(primaryAdminDB.runCommand(
+ {setFeatureCompatibilityVersion: downgradeFCV, fromConfigServer: true}));
+ checkFCV(primaryAdminDB, downgradeFCV);
}
// Ensure featureCompatibilityVersion is 'downgradeVersion' and all collections still have
diff --git a/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js b/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
index a568a5812d9..58fa04a96fe 100644
--- a/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
+++ b/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
@@ -39,7 +39,7 @@ const versions = [
{binVersion: '4.4', featureCompatibilityVersion: '4.4', testCollection: 'four_four'},
{binVersion: 'last-lts', testCollection: 'last_lts'},
{binVersion: 'last-continuous', testCollection: 'last_continuous'},
- {binVersion: 'latest', featureCompatibilityVersion: '4.7', testCollection: 'latest'},
+ {binVersion: 'latest', featureCompatibilityVersion: latestFCV, testCollection: 'latest'},
];
// These key patterns are considered valid for existing v:0 and v:1 indexes, but are considered
diff --git a/jstests/multiVersion/genericSetFCVUsage/rsm_topology_change_fcv.js b/jstests/multiVersion/genericSetFCVUsage/rsm_topology_change_fcv.js
index f3e1b591f36..02b83454000 100644
--- a/jstests/multiVersion/genericSetFCVUsage/rsm_topology_change_fcv.js
+++ b/jstests/multiVersion/genericSetFCVUsage/rsm_topology_change_fcv.js
@@ -22,7 +22,7 @@ function runTest(downgradeFCV) {
{mongos: [{setParameter: {replicaSetMonitorProtocol: "sdam"}}], config: 1, shards: 0});
const latestWireVersion = st.configRS.getPrimary().getMaxWireVersion();
- const downgradedWireVersion = downgradeFCV === "last-continuous"
+ const downgradedWireVersion = downgradeFCV === lastContinuousFCV
? latestWireVersion - 1
: latestWireVersion - numVersionsSinceLastLTS;
const downgradeRegex =
diff --git a/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js b/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js
index badce28a6b2..91ee98f64e0 100644
--- a/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js
+++ b/jstests/multiVersion/genericSetFCVUsage/set_feature_compatibility_version.js
@@ -25,6 +25,8 @@ const latest = "latest";
function runStandaloneTest(downgradeVersion) {
jsTestLog("Running standalone test with 'downgradeVersion': " + downgradeVersion);
const downgradeFCV = binVersionToFCV(downgradeVersion);
+ const unsupportedOldFCV = (parseFloat(downgradeFCV) - 1).toFixed(1);
+ const unsupportedFutureFCV = (parseFloat(latestFCV) + 0.1).toFixed(1);
let conn;
let adminDB;
@@ -38,9 +40,17 @@ function runStandaloneTest(downgradeVersion) {
jsTestLog("EXPECTED TO FAIL: featureCompatibilityVersion cannot be set to an invalid value");
assert.commandFailed(adminDB.runCommand({setFeatureCompatibilityVersion: 5}));
- assert.commandFailed(adminDB.runCommand({setFeatureCompatibilityVersion: "3.2"}));
- assert.commandFailed(adminDB.runCommand({setFeatureCompatibilityVersion: "4.8"}));
- assert.commandFailed(adminDB.runCommand({setFeatureCompatibilityVersion: "3.4"}));
+ assert.commandFailed(
+ adminDB.runCommand({setFeatureCompatibilityVersion: unsupportedOldFCV.toString()}));
+ assert.commandFailed(
+ adminDB.runCommand({setFeatureCompatibilityVersion: unsupportedFutureFCV.toString()}));
+ if (numVersionsSinceLastLTS > 2) {
+ // We do not support upgrading/downgrading to FCV's newer than last-lts but older than
+ // last-continuous.
+ const unsupportedFCV = (parseFloat(lastContinuous) - 0.1).toFixed(1);
+ assert.commandFailed(
+ adminDB.runCommand({setFeatureCompatibilityVersion: unsupportedFCV.toString()}));
+ }
jsTestLog("EXPECTED TO FAIL: setFeatureCompatibilityVersion rejects unknown fields.");
assert.commandFailed(
@@ -431,6 +441,9 @@ function runReplicaSetTest(downgradeVersion) {
function runShardingTest(downgradeVersion) {
jsTestLog("Running sharding test with 'downgradeVersion': " + downgradeVersion);
const downgradeFCV = binVersionToFCV(downgradeVersion);
+ const unsupportedOldFCV = (parseFloat(downgradeFCV) - 1).toFixed(1);
+ const unsupportedFutureFCV = (parseFloat(latestFCV) + 0.1).toFixed(1);
+
let st;
let mongosAdminDB;
let configPrimaryAdminDB;
@@ -451,8 +464,10 @@ function runShardingTest(downgradeVersion) {
jsTestLog(
"EXPECTED TO FAIL: featureCompatibilityVersion cannot be set to invalid value on mongos");
assert.commandFailed(mongosAdminDB.runCommand({setFeatureCompatibilityVersion: 5}));
- assert.commandFailed(mongosAdminDB.runCommand({setFeatureCompatibilityVersion: "3.2"}));
- assert.commandFailed(mongosAdminDB.runCommand({setFeatureCompatibilityVersion: "4.8"}));
+ assert.commandFailed(
+ mongosAdminDB.runCommand({setFeatureCompatibilityVersion: unsupportedOldFCV.toString()}));
+ assert.commandFailed(mongosAdminDB.runCommand(
+ {setFeatureCompatibilityVersion: unsupportedFutureFCV.toString()}));
jsTestLog("EXPECTED TO FAIL: setFeatureCompatibilityVersion rejects unknown fields on mongos");
assert.commandFailed(
diff --git a/jstests/multiVersion/verify_versions_test.js b/jstests/multiVersion/verify_versions_test.js
index 348537a4639..fd5b25581df 100644
--- a/jstests/multiVersion/verify_versions_test.js
+++ b/jstests/multiVersion/verify_versions_test.js
@@ -40,10 +40,10 @@ function assertBinVersionComparesEqual(v1, v2) {
"Expected \"" + v1 + "\" to compare equal to \"" + v2 + "\"");
}
-// The current version is in the 4.5 series. This has to be changed very time we bump
+// Test the current latest version. This has to be changed very time we bump
// the major version pair, but it provides a useful test of assumptions.
-assertBinVersionsEqual("4.5", version());
-assertBinVersionComparesEqual("4.5", version());
+assertBinVersionsEqual("4.8", version());
+assertBinVersionComparesEqual("4.8", version());
// "latest" is the same version as the shell, "last-lts" is not.
assertBinVersionsEqual("latest", version());
diff --git a/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js b/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
index ee3b1181754..bbf82e8614c 100644
--- a/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
+++ b/jstests/noPassthroughWithMongod/isMaster_feature_compatibility_version.js
@@ -80,7 +80,9 @@ function runTest(downgradeFCV, downgradeWireVersion, maxWireVersion, cmd) {
// Test upgrade/downgrade between 'latest' and 'last-continuous' if 'last-continuous' is not
// 'last-lts'.
if (lastContinuousFCV !== lastLTSFCV) {
- runTest(lastContinuousFCV, res.maxWireVersion - 1, res.maxWireVersion);
+ runTest(lastContinuousFCV, res.maxWireVersion - 1, res.maxWireVersion, "hello");
+ runTest(lastContinuousFCV, res.maxWireVersion - 1, res.maxWireVersion, "isMaster");
+ runTest(lastContinuousFCV, res.maxWireVersion - 1, res.maxWireVersion, "ismaster");
}
// Test upgrade/downgrade between 'latest' and 'last-lts'.
diff --git a/jstests/replsets/awaitable_ismaster_fcv_change.js b/jstests/replsets/awaitable_ismaster_fcv_change.js
index 39e0e0ad64d..f1e9276ffce 100644
--- a/jstests/replsets/awaitable_ismaster_fcv_change.js
+++ b/jstests/replsets/awaitable_ismaster_fcv_change.js
@@ -165,13 +165,13 @@ function runTest(downgradeFCV) {
assert.eq(0, numAwaitingTopologyChangeOnSecondary);
// Get the new topologyVersion.
- const primaryResponseAfterDowngrade = helloAsInternalClient();
+ let primaryResponseAfterDowngrade = helloAsInternalClient();
assert(primaryResponseAfterDowngrade.hasOwnProperty("topologyVersion"),
tojson(primaryResponseAfterDowngrade));
let primaryTopologyVersionAfterDowngrade = primaryResponseAfterDowngrade.topologyVersion;
let minWireVersionAfterDowngrade = primaryResponseAfterDowngrade.minWireVersion;
- const secondaryResponseAfterDowngrade =
+ let secondaryResponseAfterDowngrade =
assert.commandWorked(secondaryAdminDB.runCommand({hello: 1}));
assert(secondaryResponseAfterDowngrade.hasOwnProperty("topologyVersion"),
tojson(secondaryResponseAfterDowngrade));
diff --git a/src/mongo/db/commands/feature_compatibility_version_parser.h b/src/mongo/db/commands/feature_compatibility_version_parser.h
index d1e90016ab3..ac5dd2c4b28 100644
--- a/src/mongo/db/commands/feature_compatibility_version_parser.h
+++ b/src/mongo/db/commands/feature_compatibility_version_parser.h
@@ -43,23 +43,29 @@ class FeatureCompatibilityVersionParser {
public:
static constexpr StringData kVersion44 = "4.4"_sd;
static constexpr StringData kVersion47 = "4.7"_sd;
+ static constexpr StringData kVersion48 = "4.8"_sd;
static constexpr StringData kVersionDowngradingFrom47To44 = "downgrading from 4.7 to 4.4"_sd;
+ static constexpr StringData kVersionDowngradingFrom48To44 = "downgrading from 4.8 to 4.4"_sd;
+ static constexpr StringData kVersionDowngradingFrom48To47 = "downgrading from 4.8 to 4.7"_sd;
static constexpr StringData kVersionUpgradingFrom44To47 = "upgrading from 4.4 to 4.7"_sd;
+ static constexpr StringData kVersionUpgradingFrom47To48 = "upgrading from 4.7 to 4.8"_sd;
+ static constexpr StringData kVersionUpgradingFrom44To48 = "upgrading from 4.4 to 4.8"_sd;
static constexpr StringData kVersionUnset = "Unset"_sd;
static constexpr StringData kParameterName = "featureCompatibilityVersion"_sd;
static constexpr StringData kLastLTS = kVersion44;
- static constexpr StringData kLastContinuous = kVersion44;
- static constexpr StringData kLatest = kVersion47;
- static constexpr StringData kUpgradingFromLastLTSToLatest = kVersionUpgradingFrom44To47;
- static constexpr StringData kUpgradingFromLastContinuousToLatest = kVersionUpgradingFrom44To47;
+ static constexpr StringData kLastContinuous = kVersion47;
+ static constexpr StringData kLatest = kVersion48;
+ static constexpr StringData kUpgradingFromLastLTSToLatest = kVersionUpgradingFrom44To48;
+ static constexpr StringData kUpgradingFromLastContinuousToLatest = kVersionUpgradingFrom47To48;
// kVersionUpgradingFromLastLTSToLastContinuous should assigned kVersionUnset when kLastLTS and
// kLastContinuous are equal.
- static constexpr StringData kVersionUpgradingFromLastLTSToLastContinuous = kVersionUnset;
- static constexpr StringData kDowngradingFromLatestToLastLTS = kVersionDowngradingFrom47To44;
+ static constexpr StringData kVersionUpgradingFromLastLTSToLastContinuous =
+ kVersionUpgradingFrom44To47;
+ static constexpr StringData kDowngradingFromLatestToLastLTS = kVersionDowngradingFrom48To44;
static constexpr StringData kDowngradingFromLatestToLastContinuous =
- kVersionDowngradingFrom47To44;
+ kVersionDowngradingFrom48To47;
static FeatureCompatibilityParams::Version parseVersion(StringData versionString);
diff --git a/src/mongo/db/server_options.h b/src/mongo/db/server_options.h
index ae3a87ec5e1..72035292cbb 100644
--- a/src/mongo/db/server_options.h
+++ b/src/mongo/db/server_options.h
@@ -197,29 +197,35 @@ struct ServerGlobalParams {
kUnsetDefault44Behavior = 1,
kFullyDowngradedTo44 = 2,
kDowngradingFrom47To44 = 3,
- kUpgradingFrom44To47 = 4,
- kVersion47 = 5,
+ kDowngradingFrom48To44 = 4,
+ kUpgradingFrom44To47 = 5,
+ kUpgradingFrom44To48 = 6,
+ kVersion47 = 7,
+ kDowngradingFrom48To47 = 8,
+ kUpgradingFrom47To48 = 9,
+ kVersion48 = 10,
};
// These constants should only be used for generic FCV references. Generic references are
// FCV references that are expected to exist across LTS binary versions.
- static constexpr Version kLatest = Version::kVersion47;
- static constexpr Version kLastContinuous = Version::kFullyDowngradedTo44;
+ static constexpr Version kLatest = Version::kVersion48;
+ static constexpr Version kLastContinuous = Version::kVersion47;
static constexpr Version kLastLTS = Version::kFullyDowngradedTo44;
// These constants should only be used for generic FCV references. Generic references are
// FCV references that are expected to exist across LTS binary versions.
// NOTE: DO NOT USE THEM FOR REGULAR FCV CHECKS.
- static constexpr Version kUpgradingFromLastLTSToLatest = Version::kUpgradingFrom44To47;
+ static constexpr Version kUpgradingFromLastLTSToLatest = Version::kUpgradingFrom44To48;
static constexpr Version kUpgradingFromLastContinuousToLatest =
- Version::kUpgradingFrom44To47;
- static constexpr Version kDowngradingFromLatestToLastLTS = Version::kDowngradingFrom47To44;
+ Version::kUpgradingFrom47To48;
+ static constexpr Version kDowngradingFromLatestToLastLTS = Version::kDowngradingFrom48To44;
static constexpr Version kDowngradingFromLatestToLastContinuous =
- Version::kDowngradingFrom47To44;
+ Version::kDowngradingFrom48To47;
// kUpgradingFromLastLTSToLastContinuous is only ever set to a valid FCV when
// kLastLTS and kLastContinuous are not equal. Otherwise, this value should be set to
// kInvalid.
- static constexpr Version kUpgradingFromLastLTSToLastContinuous = Version::kInvalid;
+ static constexpr Version kUpgradingFromLastLTSToLastContinuous =
+ Version::kUpgradingFrom44To47;
/**
* On startup, the featureCompatibilityVersion may not have been explicitly set yet. This
diff --git a/src/mongo/db/startup_recovery.cpp b/src/mongo/db/startup_recovery.cpp
index fbaaef9637f..45101c407cb 100644
--- a/src/mongo/db/startup_recovery.cpp
+++ b/src/mongo/db/startup_recovery.cpp
@@ -115,12 +115,13 @@ Status restoreMissingFeatureCompatibilityVersionDocument(OperationContext* opCtx
fcvColl,
BSON("_id" << FeatureCompatibilityVersionParser::kParameterName),
featureCompatibilityVersion)) {
+ // (Generic FCV reference): This FCV reference should exist across LTS binary versions.
LOGV2(21000,
"Re-creating featureCompatibilityVersion document that was deleted. Creating new "
"document with version "
- "{FeatureCompatibilityVersionParser_kVersion44}.",
+ "{FeatureCompatibilityVersionParser_kLastLTS}.",
"Re-creating featureCompatibilityVersion document that was deleted",
- "version"_attr = FeatureCompatibilityVersionParser::kVersion44);
+ "version"_attr = FeatureCompatibilityVersionParser::kLastLTS);
FeatureCompatibilityVersionDocument fcvDoc;
// (Generic FCV reference): This FCV reference should exist across LTS binary versions.
diff --git a/src/mongo/db/wire_version.h b/src/mongo/db/wire_version.h
index 736038f42ea..2e442738de9 100644
--- a/src/mongo/db/wire_version.h
+++ b/src/mongo/db/wire_version.h
@@ -86,9 +86,12 @@ enum WireVersion {
// Supports features available from 4.7 and onwards.
WIRE_VERSION_47 = 10,
+ // Supports features available from 4.8 and onwards.
+ WIRE_VERSION_48 = 11,
+
// Set this to the highest value in this enum - it will be the default maxWireVersion for
// the WireSpec values.
- LATEST_WIRE_VERSION = WIRE_VERSION_47,
+ LATEST_WIRE_VERSION = WIRE_VERSION_48,
// Set this to LATEST_WIRE_VERSION - 1.
LAST_CONT_WIRE_VERSION = LATEST_WIRE_VERSION - 1,
diff --git a/src/mongo/rpc/protocol_test.cpp b/src/mongo/rpc/protocol_test.cpp
index e67cf9f6720..97f6ac1d763 100644
--- a/src/mongo/rpc/protocol_test.cpp
+++ b/src/mongo/rpc/protocol_test.cpp
@@ -290,13 +290,16 @@ TEST(Protocol, validateWireVersion) {
for (const auto& mongoSRange : mongoSBinaryRanges) {
for (const auto& mongoDLatestRange : mongoDLatestBinaryRanges) {
- // MongoS 'latest' binary can communicate with all FCV versions
- // MongoS 'last-cont' binary can only communicate with MongoD downgraded 'last-cont' FCV
- // MongoS 'last-lts' binary can only communicate with MongoD downgraded 'last-lts' FCV
+ // MongoS 'latest' binary can communicate with all FCV versions.
+ // MongoS 'last-cont' binary can only communicate with MongoD downgraded 'last-cont' and
+ // 'last-lts' FCV.
+ // MongoS 'last-lts' binary can only communicate with MongoD downgraded 'last-lts' FCV.
if (mongoSRange.minWireVersion == WireVersion::LATEST_WIRE_VERSION ||
(mongoSRange.minWireVersion == WireVersion::LAST_CONT_WIRE_VERSION &&
mongoDLatestRange.minWireVersion == WireVersion::LAST_CONT_WIRE_VERSION) ||
(mongoSRange.minWireVersion == WireVersion::LAST_LTS_WIRE_VERSION &&
+ mongoDLatestRange.minWireVersion == WireVersion::LAST_LTS_WIRE_VERSION) ||
+ (mongoSRange.minWireVersion == WireVersion::LAST_CONT_WIRE_VERSION &&
mongoDLatestRange.minWireVersion == WireVersion::LAST_LTS_WIRE_VERSION)) {
VALIDATE_WIRE_VERSION(ASSERT_OK,
mongoSRange.minWireVersion,
diff --git a/src/mongo/shell/feature_compatibility_version.js b/src/mongo/shell/feature_compatibility_version.js
index 1c2c727be33..f607011cf4d 100644
--- a/src/mongo/shell/feature_compatibility_version.js
+++ b/src/mongo/shell/feature_compatibility_version.js
@@ -10,13 +10,13 @@
* multiple times.
*/
-var latestFCV = "4.7";
-var lastContinuousFCV = "4.4";
+var latestFCV = "4.8";
+var lastContinuousFCV = "4.7";
var lastLTSFCV = "4.4";
// The number of versions since the last-lts version. When numVersionsSinceLastLTS = 1,
// lastContinuousFCV is equal to lastLTSFCV. This is used to calculate the expected minWireVersion
// in jstests that use the lastLTSFCV. This should be updated on each release.
-var numVersionsSinceLastLTS = 1;
+var numVersionsSinceLastLTS = 2;
/**
* Returns the FCV associated with a binary version.
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index c23b9afff65..39e47a73004 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -210,7 +210,7 @@ MongoRunner.binVersionSubs = [
new MongoRunner.VersionSub(extractMajorVersionFromVersionString(shellVersion()),
shellVersion()),
// To-be-updated when we branch for the next release.
- new MongoRunner.VersionSub("last-continuous", "4.4"),
+ new MongoRunner.VersionSub("last-continuous", "4.7"),
// To be updated when we branch for the next LTS release.
new MongoRunner.VersionSub("last-lts", "4.4")
];
diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js
index 63f57bc0ccd..866f6bc9762 100644
--- a/src/mongo/shell/shardingtest.js
+++ b/src/mongo/shell/shardingtest.js
@@ -1008,7 +1008,8 @@ var ShardingTest = function(params) {
// as well, because it does not update mongosOptions.binVersion.
// TODO SERVER-50389: Differentiate between 'last-lts' and 'last-continuous' when
// last-continuous is supported with shardMixedBinVersions.
- if (jsTestOptions().shardMixedBinVersions ||
+ if ((MongoRunner.areBinVersionsTheSame(binVersion, "last-lts") &&
+ jsTestOptions().shardMixedBinVersions) ||
(jsTestOptions().mongosBinVersion &&
MongoRunner.areBinVersionsTheSame(binVersion, jsTestOptions().mongosBinVersion))) {
return true;