diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2020-01-16 02:02:52 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-16 02:02:52 +0000 |
commit | ea0f5e7a4517404725aebbad5fb2ec2d53e5aa9f (patch) | |
tree | 376650f14c3f8426e09d50f22dc92f947e24dc22 /src/mongo/db/commands.h | |
parent | db5e7863b095355aae7a09b127d11de1bed1af33 (diff) | |
download | mongo-ea0f5e7a4517404725aebbad5fb2ec2d53e5aa9f.tar.gz |
SERVER-45098 test that RWC defaults are correctly applied to commands
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index efc4230556f..b993a6b737c 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -146,9 +146,11 @@ struct CommandHelpers { const BSONObj& request); /** - * Returns a copy of 'cmdObj' with a majority writeConcern appended. + * Returns a copy of 'cmdObj' with a majority writeConcern appended. If the command object does + * not contain a writeConcern, 'defaultWC' will be used instead, if supplied. */ - static BSONObj appendMajorityWriteConcern(const BSONObj& cmdObj); + static BSONObj appendMajorityWriteConcern( + const BSONObj& cmdObj, WriteConcernOptions defaultWC = WriteConcernOptions()); /** * Rewrites cmdObj into a format safe to blindly forward to shards. |