summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorAdam Rayner <adam.rayner@gmail.com>2022-04-12 16:23:18 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-12 22:30:03 +0000
commitfd75059c83cfa4be0225bd03b9c96a21aea39887 (patch)
tree31151303fe3a386c937dc07170ba083d1af14dd3 /src/mongo/db/commands
parent89918f61af3abda7aef79fc033d4eb1f6808cbf2 (diff)
downloadmongo-fd75059c83cfa4be0225bd03b9c96a21aea39887.tar.gz
SERVER-59922: Use FCV check with feature flag in replica set setClusterParameter
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/set_cluster_parameter_command.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/commands/set_cluster_parameter_command.cpp b/src/mongo/db/commands/set_cluster_parameter_command.cpp
index ce752e33266..31df926ce68 100644
--- a/src/mongo/db/commands/set_cluster_parameter_command.cpp
+++ b/src/mongo/db/commands/set_cluster_parameter_command.cpp
@@ -68,9 +68,10 @@ public:
using InvocationBase::InvocationBase;
void typedRun(OperationContext* opCtx) {
- uassert(ErrorCodes::IllegalOperation,
- "Cannot set cluster parameter, gFeatureFlagClusterWideConfig is not enabled",
- gFeatureFlagClusterWideConfig.isEnabledAndIgnoreFCV());
+ uassert(
+ ErrorCodes::IllegalOperation,
+ "Cannot set cluster parameter, gFeatureFlagClusterWideConfig is not enabled",
+ gFeatureFlagClusterWideConfig.isEnabled(serverGlobalParams.featureCompatibility));
uassert(ErrorCodes::ErrorCodes::NotImplemented,
"setClusterParameter can only run on mongos in sharded clusters",