summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/shardsvr_create_global_index_command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/shardsvr_create_global_index_command.cpp')
-rw-r--r--src/mongo/db/s/shardsvr_create_global_index_command.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/db/s/shardsvr_create_global_index_command.cpp b/src/mongo/db/s/shardsvr_create_global_index_command.cpp
index c955676a169..cdf86c95e60 100644
--- a/src/mongo/db/s/shardsvr_create_global_index_command.cpp
+++ b/src/mongo/db/s/shardsvr_create_global_index_command.cpp
@@ -84,11 +84,6 @@ public:
}
void typedRun(OperationContext* opCtx) {
-
- uassert(ErrorCodes::CommandNotSupported,
- "_shardsvrCreateGlobalIndex command not enabled",
- gFeatureFlagGlobalIndexes.isEnabledAndIgnoreFCV());
-
const auto indexUUID = request().getCommandParameter();
global_index::createContainer(opCtx, indexUUID);
}
@@ -102,7 +97,10 @@ public:
ActionType::internal));
}
};
-} shardsvrCreateGlobalIndexCommand;
+};
+
+MONGO_REGISTER_FEATURE_FLAGGED_COMMAND(ShardsvrCreateGlobalIndexCommand,
+ mongo::gFeatureFlagGlobalIndexes);
} // namespace
} // namespace mongo