diff options
Diffstat (limited to 'src/mongo/db/commands/rwc_defaults_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/rwc_defaults_commands.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/commands/rwc_defaults_commands.cpp b/src/mongo/db/commands/rwc_defaults_commands.cpp index 681057ef414..0253c2dc31a 100644 --- a/src/mongo/db/commands/rwc_defaults_commands.cpp +++ b/src/mongo/db/commands/rwc_defaults_commands.cpp @@ -102,6 +102,12 @@ public: auto typedRun(OperationContext* opCtx) { assertNotStandaloneOrShardServer(opCtx, SetDefaultRWConcern::kCommandName); + uassert(ErrorCodes::CommandNotSupported, + str::stream() << "'" << SetDefaultRWConcern::kCommandName + << "' is only supported in feature compatibility version 4.4", + serverGlobalParams.featureCompatibility.getVersion() == + ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo44); + auto& rwcDefaults = ReadWriteConcernDefaults::get(opCtx->getServiceContext()); auto newDefaults = rwcDefaults.generateNewConcerns( opCtx, request().getDefaultReadConcern(), request().getDefaultWriteConcern()); |