summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-01-16 02:02:52 +0000
committerevergreen <evergreen@mongodb.com>2020-01-16 02:02:52 +0000
commitea0f5e7a4517404725aebbad5fb2ec2d53e5aa9f (patch)
tree376650f14c3f8426e09d50f22dc92f947e24dc22 /src/mongo/db/commands.h
parentdb5e7863b095355aae7a09b127d11de1bed1af33 (diff)
downloadmongo-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.h6
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.