summaryrefslogtreecommitdiff
path: root/src/mongo/db/fcv_op_observer.cpp
diff options
context:
space:
mode:
authorJason Chan <jason.chan@mongodb.com>2020-08-19 14:18:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-20 22:37:18 +0000
commitf014da8dc00c3d7cbced0f074ad9428b5f887dad (patch)
tree65f8e5a0e3cffd65fce4f2f851b9f6d2c7a52495 /src/mongo/db/fcv_op_observer.cpp
parentad83ad71c3c65e0a7e8dcb0073069dbf6299b0bb (diff)
downloadmongo-f014da8dc00c3d7cbced0f074ad9428b5f887dad.tar.gz
SERVER-50107 Add new lastContinuous upgrade/downgrade path to setFeatureCompatibilityVersion command
Diffstat (limited to 'src/mongo/db/fcv_op_observer.cpp')
-rw-r--r--src/mongo/db/fcv_op_observer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/fcv_op_observer.cpp b/src/mongo/db/fcv_op_observer.cpp
index 723977bf917..ce9eb8f8fcc 100644
--- a/src/mongo/db/fcv_op_observer.cpp
+++ b/src/mongo/db/fcv_op_observer.cpp
@@ -48,6 +48,7 @@
#include "mongo/util/assert_util.h"
namespace mongo {
+using FeatureCompatibilityParams = ServerGlobalParams::FeatureCompatibility;
void FcvOpObserver::_setVersion(OperationContext* opCtx,
ServerGlobalParams::FeatureCompatibility::Version newVersion) {
@@ -86,8 +87,10 @@ void FcvOpObserver::_setVersion(OperationContext* opCtx,
// 2. Setting featureCompatibilityVersion from fullyDowngraded to upgrading.
// (Generic FCV reference): This FCV check should exist across LTS binary versions.
const auto shouldIncrementTopologyVersion =
- newVersion == ServerGlobalParams::FeatureCompatibility::kLastLTS ||
- newVersion == ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To47;
+ newVersion == FeatureCompatibilityParams::kLastLTS ||
+ newVersion == FeatureCompatibilityParams::kLastContinuous ||
+ newVersion == FeatureCompatibilityParams::kUpgradingFromLastLTSToLatest ||
+ newVersion == FeatureCompatibilityParams::kUpgradingFromLastContinuousToLatest;
if (isReplSet && shouldIncrementTopologyVersion) {
replCoordinator->incrementTopologyVersion();
}