summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2018-06-21 14:55:01 -0400
committerBlake Oler <blake.oler@mongodb.com>2018-07-02 10:50:53 -0400
commit53a34c4f01d6b18df4c4800df9a72b1eff07fb6a (patch)
tree59dcf1abafee02e14dc8d1d51c43c0965bcaf29d /src/mongo/db/commands/set_feature_compatibility_version_command.cpp
parentb3a542545c7367f96d57cab5e89dc389748c0e2c (diff)
downloadmongo-53a34c4f01d6b18df4c4800df9a72b1eff07fb6a.tar.gz
SERVER-35655 Update FCV constants throughout server code.
SERVER-35169 Bump wire protocol version for 4.2. SERVER-35752 Ensure tests that rely on FCV pass after updating FCV constants. SERVER-35163 Unblacklist tests that expect FCV version to differ between "last-stable" and "latest." SERVER-34984 Update major_version_upgrade.js to call setFCV to the latest FCV. SERVER-35656 Ensure a 4.0 mongos crashes upon attempting to connect to an FCV 4.2 cluster. SERVER-35404 Re-enable the sharding_last_stable_mongos_and_mixed_shards suite.
Diffstat (limited to 'src/mongo/db/commands/set_feature_compatibility_version_command.cpp')
-rw-r--r--src/mongo/db/commands/set_feature_compatibility_version_command.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
index 92ef3d07a7c..e751532068b 100644
--- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
+++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
@@ -57,7 +57,7 @@ namespace {
MONGO_FAIL_POINT_DEFINE(featureCompatibilityDowngrade);
MONGO_FAIL_POINT_DEFINE(featureCompatibilityUpgrade);
/**
- * Sets the minimum allowed version for the cluster. If it is 3.4, then the node should not use 3.6
+ * Sets the minimum allowed version for the cluster. If it is 4.0, then the node should not use 4.2
* features.
*
* Format:
@@ -85,11 +85,11 @@ public:
std::string help() const override {
std::stringstream h;
h << "Set the API version exposed by this node. If set to \""
- << FeatureCompatibilityVersionParser::kVersion36
- << "\", then 4.0 features are disabled. If \""
<< FeatureCompatibilityVersionParser::kVersion40
- << "\", then 4.0 features are enabled, and all nodes in the cluster must be binary "
- "version 4.0. See "
+ << "\", then 4.2 features are disabled. If \""
+ << FeatureCompatibilityVersionParser::kVersion42
+ << "\", then 4.2 features are enabled, and all nodes in the cluster must be binary "
+ "version 4.2. See "
<< feature_compatibility_version_documentation::kCompatibilityLink << ".";
return h.str();
}
@@ -138,16 +138,16 @@ public:
ServerGlobalParams::FeatureCompatibility::Version actualVersion =
serverGlobalParams.featureCompatibility.getVersion();
- if (requestedVersion == FeatureCompatibilityVersionParser::kVersion40) {
+ if (requestedVersion == FeatureCompatibilityVersionParser::kVersion42) {
uassert(ErrorCodes::IllegalOperation,
- "cannot initiate featureCompatibilityVersion upgrade to 4.0 while a previous "
- "featureCompatibilityVersion downgrade to 3.6 has not completed. Finish "
- "downgrade to 3.6, then upgrade to 4.0.",
+ "cannot initiate featureCompatibilityVersion upgrade to 4.2 while a previous "
+ "featureCompatibilityVersion downgrade to 4.0 has not completed. Finish "
+ "downgrade to 4.0, then upgrade to 4.2.",
actualVersion !=
- ServerGlobalParams::FeatureCompatibility::Version::kDowngradingTo36);
+ ServerGlobalParams::FeatureCompatibility::Version::kDowngradingTo40);
if (actualVersion ==
- ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo40) {
+ ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo42) {
// Set the client's last opTime to the system last opTime so no-ops wait for
// writeConcern.
repl::ReplClientInfo::forClient(opCtx->getClient())
@@ -161,7 +161,7 @@ public:
// Take the global lock in S mode to create a barrier for operations taking the
// global IX or X locks. This ensures that either
// - The global IX/X locked operation will start after the FCV change, see the
- // upgrading to 4.0 FCV and act accordingly.
+ // upgrading to 4.2 FCV and act accordingly.
// - The global IX/X locked operation began prior to the FCV change, is acting on
// that assumption and will finish before upgrade procedures begin right after
// this.
@@ -183,15 +183,15 @@ public:
}
FeatureCompatibilityVersion::unsetTargetUpgradeOrDowngrade(opCtx, requestedVersion);
- } else if (requestedVersion == FeatureCompatibilityVersionParser::kVersion36) {
+ } else if (requestedVersion == FeatureCompatibilityVersionParser::kVersion40) {
uassert(ErrorCodes::IllegalOperation,
- "cannot initiate setting featureCompatibilityVersion to 3.6 while a previous "
- "featureCompatibilityVersion upgrade to 4.0 has not completed.",
+ "cannot initiate setting featureCompatibilityVersion to 4.0 while a previous "
+ "featureCompatibilityVersion upgrade to 4.2 has not completed.",
actualVersion !=
- ServerGlobalParams::FeatureCompatibility::Version::kUpgradingTo40);
+ ServerGlobalParams::FeatureCompatibility::Version::kUpgradingTo42);
if (actualVersion ==
- ServerGlobalParams::FeatureCompatibility::Version::kFullyDowngradedTo36) {
+ ServerGlobalParams::FeatureCompatibility::Version::kFullyDowngradedTo40) {
// Set the client's last opTime to the system last opTime so no-ops wait for
// writeConcern.
repl::ReplClientInfo::forClient(opCtx->getClient())
@@ -205,7 +205,7 @@ public:
// Take the global lock in S mode to create a barrier for operations taking the
// global IX or X locks. This ensures that either
// - The global IX/X locked operation will start after the FCV change, see the
- // downgrading to 3.6 FCV and act accordingly.
+ // downgrading to 4.0 FCV and act accordingly.
// - The global IX/X locked operation began prior to the FCV change, is acting on
// that assumption and will finish before downgrade procedures begin right after
// this.