summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp')
-rw-r--r--src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp b/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp
index f70df3d9d9f..01c3032aa40 100644
--- a/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp
+++ b/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp
@@ -56,9 +56,8 @@ public:
uassert(ErrorCodes::IllegalOperation,
"_configsvrSetAllowMigrations can only be run on config servers",
serverGlobalParams.clusterRole == ClusterRole::ConfigServer);
- uassert(ErrorCodes::InvalidOptions,
- "_configsvrSetAllowMigrations must be called with majority writeConcern",
- opCtx->getWriteConcern().wMode == WriteConcernOptions::kMajority);
+ CommandHelpers::uassertCommandRunWithMajority(Request::kCommandName,
+ opCtx->getWriteConcern());
// Set the operation context read concern level to local for reads into the config
// database.