diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2020-01-08 20:22:44 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-08 20:22:44 +0000 |
commit | d205919f8acfc2c044338ff94455d1feea1852e4 (patch) | |
tree | 7f2f27fd4f3fc0a2e69cbbb5822725b2a63908df /src/mongo/db/commands/rwc_defaults_commands.cpp | |
parent | 39f48ff919a0ffae178511b4d585e6776a92733c (diff) | |
download | mongo-d205919f8acfc2c044338ff94455d1feea1852e4.tar.gz |
SERVER-43723 FCV gating for RWC defaults
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()); |