diff options
author | Marcos José Grillo Ramirez <marcos.grillo@mongodb.com> | 2022-02-21 15:47:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-21 16:15:22 +0000 |
commit | b80fabd0dfc93d154eb427f46c73b1acea857cbf (patch) | |
tree | bee8e399c6eed831d3897b75b4b10863e88af3b9 | |
parent | ac78d0267c2b7f7e200c7b66f3806183406008fd (diff) | |
download | mongo-b80fabd0dfc93d154eb427f46c73b1acea857cbf.tar.gz |
SERVER-63088 Enable chunk version persisted format change by default and ensure draining of migrations on FCV change only when necessary
-rw-r--r-- | src/mongo/db/commands/set_feature_compatibility_version_command.cpp | 12 | ||||
-rw-r--r-- | src/mongo/s/pm2583_feature_flags.idl | 3 |
2 files changed, 10 insertions, 5 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 ca62f2c7197..1531ffd9f79 100644 --- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp +++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp @@ -340,8 +340,10 @@ public: .isEnabledOnVersion(actualVersion) && !feature_flags::gFeatureFlagMigrationRecipientCriticalSection .isEnabledOnVersion(requestedVersion)) || - feature_flags::gFeatureFlagNewPersistedChunkVersionFormat.isEnabledOnVersion( - actualVersion)) { + (feature_flags::gFeatureFlagNewPersistedChunkVersionFormat.isEnabledOnVersion( + actualVersion) && + !feature_flags::gFeatureFlagNewPersistedChunkVersionFormat.isEnabledOnVersion( + requestedVersion))) { drainNewMoveChunks.emplace(opCtx, "setFeatureCompatibilityVersionDowngrade"); // At this point, because we are holding the MigrationBlockingGuard, no new @@ -437,8 +439,10 @@ public: actualVersion) && feature_flags::gFeatureFlagMigrationRecipientCriticalSection.isEnabledOnVersion( requestedVersion)) || - feature_flags::gFeatureFlagNewPersistedChunkVersionFormat.isEnabledOnVersion( - actualVersion)) { + (!feature_flags::gFeatureFlagNewPersistedChunkVersionFormat.isEnabledOnVersion( + actualVersion) && + feature_flags::gFeatureFlagNewPersistedChunkVersionFormat.isEnabledOnVersion( + requestedVersion))) { drainOldMoveChunks.emplace(opCtx, "setFeatureCompatibilityVersionUpgrade"); // At this point, because we are holding the MigrationBlockingGuard, no new diff --git a/src/mongo/s/pm2583_feature_flags.idl b/src/mongo/s/pm2583_feature_flags.idl index 74fb26df3fb..2fe34ddf7a3 100644 --- a/src/mongo/s/pm2583_feature_flags.idl +++ b/src/mongo/s/pm2583_feature_flags.idl @@ -38,4 +38,5 @@ feature_flags: featureFlagNewPersistedChunkVersionFormat: description: Feature flag for enabling the new persisted chunk version format. cpp_varname: gFeatureFlagNewPersistedChunkVersionFormat - default: false + default: true + version: 6.0 |