summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2021-12-21 17:12:32 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-21 18:07:36 +0000
commit84296ca394c96ebd3e63d5608c7878a1dd15b876 (patch)
tree9a72d568f69a0056c06da5698f669ba881ae0dc8 /src/mongo/db/catalog
parent02c07c102b0c6d97085fb02805b0e41dedca0a46 (diff)
downloadmongo-84296ca394c96ebd3e63d5608c7878a1dd15b876.tar.gz
SERVER-62186 Update FCV reference for dropping an index while having a separate index build on the same collection
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r--src/mongo/db/catalog/drop_indexes.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/drop_indexes.cpp b/src/mongo/db/catalog/drop_indexes.cpp
index e65bbc614c5..8d0ec2229e2 100644
--- a/src/mongo/db/catalog/drop_indexes.cpp
+++ b/src/mongo/db/catalog/drop_indexes.cpp
@@ -487,8 +487,10 @@ DropIndexesReply dropIndexes(OperationContext* opCtx,
invariant((*collection)->getIndexCatalog()->numIndexesInProgress(opCtx) == 0);
}
- // TODO(SERVER-61481): (Generic FCV reference): Remove this block once kLastLTS is 6.0.
- if (serverGlobalParams.featureCompatibility.isLessThan(multiversion::GenericFCV::kLatest)) {
+ // TODO(SERVER-61481): Remove this block once kLastLTS is 6.0. As of 5.2, dropping an index
+ // while having a separate index build on the same collection is permitted.
+ if (serverGlobalParams.featureCompatibility.isLessThan(
+ multiversion::FeatureCompatibilityVersion::kVersion_5_2)) {
// The index catalog requires that no active index builders are running when dropping ready
// indexes.
IndexBuildsCoordinator::get(opCtx)->assertNoIndexBuildInProgForCollection(collectionUUID);
@@ -532,8 +534,10 @@ Status dropIndexesForApplyOps(OperationContext* opCtx,
"indexes"_attr = cmdObj[kIndexFieldName].toString(false));
}
- // TODO(SERVER-61481): (Generic FCV reference): Remove this block once kLastLTS is 6.0.
- if (serverGlobalParams.featureCompatibility.isLessThan(multiversion::GenericFCV::kLatest)) {
+ // TODO(SERVER-61481): Remove this block once kLastLTS is 6.0. As of 5.2, dropping an index
+ // while having a separate index build on the same collection is permitted.
+ if (serverGlobalParams.featureCompatibility.isLessThan(
+ multiversion::FeatureCompatibilityVersion::kVersion_5_2)) {
IndexBuildsCoordinator::get(opCtx)->assertNoIndexBuildInProgForCollection(
collection->uuid());
}