summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbdirectclient.cpp
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2020-02-20 21:42:07 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-05 13:03:43 +0000
commit747ff353cbc819d032fa727d4bd7ffad16ea0437 (patch)
treed9b3d7e9af26138d7b74e0416a93d6110e326af0 /src/mongo/db/dbdirectclient.cpp
parent7c4b875a8858c5bd5efc9bf4f285f7f440fdfdc0 (diff)
downloadmongo-747ff353cbc819d032fa727d4bd7ffad16ea0437.tar.gz
SERVER-45692 add explicit RWC to inter-node commands (even if merely kImplicitDefault)
Diffstat (limited to 'src/mongo/db/dbdirectclient.cpp')
-rw-r--r--src/mongo/db/dbdirectclient.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp
index 84818dcf8c4..6c8a8d3d43e 100644
--- a/src/mongo/db/dbdirectclient.cpp
+++ b/src/mongo/db/dbdirectclient.cpp
@@ -166,15 +166,22 @@ unique_ptr<DBClientCursor> DBDirectClient::query(const NamespaceStringOrUUID& ns
int nToSkip,
const BSONObj* fieldsToReturn,
int queryOptions,
- int batchSize) {
+ int batchSize,
+ boost::optional<BSONObj> readConcernObj) {
+ invariant(!readConcernObj, "passing readConcern to DBDirectClient functions is not supported");
return DBClientBase::query(
nsOrUuid, query, nToReturn, nToSkip, fieldsToReturn, queryOptions, batchSize);
}
-long long DBDirectClient::count(
- const NamespaceStringOrUUID nsOrUuid, const BSONObj& query, int options, int limit, int skip) {
+long long DBDirectClient::count(const NamespaceStringOrUUID nsOrUuid,
+ const BSONObj& query,
+ int options,
+ int limit,
+ int skip,
+ boost::optional<BSONObj> readConcernObj) {
+ invariant(!readConcernObj, "passing readConcern to DBDirectClient functions is not supported");
DirectClientScope directClientScope(_opCtx);
- BSONObj cmdObj = _countCmd(nsOrUuid, query, options, limit, skip);
+ BSONObj cmdObj = _countCmd(nsOrUuid, query, options, limit, skip, boost::none);
auto dbName = (nsOrUuid.uuid() ? nsOrUuid.dbname() : (*nsOrUuid.nss()).db().toString());