diff options
author | Matt Broadstone <mbroadst@mongodb.com> | 2022-02-01 14:55:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-01 16:12:55 +0000 |
commit | 1cc5df724ab48604e19a8b2f3703563c553b1ba0 (patch) | |
tree | 68493e81ddd2bc3fc790dd626ad2de689fef405c /src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp | |
parent | b2098c676bdc64e3194734fa632b133c47496646 (diff) | |
download | mongo-1cc5df724ab48604e19a8b2f3703563c553b1ba0.tar.gz |
SERVER-62609 Represent the w parameter of WriteConcernOptions as a variant
Diffstat (limited to 'src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp')
-rw-r--r-- | src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp b/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp index 1703dd86829..401356eb0f9 100644 --- a/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp +++ b/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp @@ -72,11 +72,8 @@ public: opCtx->setAlwaysInterruptAtStepDownOrUp(); - uassert(ErrorCodes::InvalidOptions, - str::stream() << Request::kCommandName - << " must be called with majority writeConcern, got " - << request().toBSON(BSONObj()), - opCtx->getWriteConcern().wMode == WriteConcernOptions::kMajority); + CommandHelpers::uassertCommandRunWithMajority(Request::kCommandName, + opCtx->getWriteConcern()); SetAllowMigrationsRequest setAllowMigationsCmdRequest = request().getSetAllowMigrationsRequest(); |