summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.h
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2019-05-20 17:39:25 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2019-06-03 10:30:55 -0400
commit9bcb318c4c9f2c482413a9d85b7e7c99c0492653 (patch)
treed05095e58f4bc309b7ff2191ae4d794fb1a0117f /src/mongo/db/clientcursor.h
parent3542405aa31989401731f50ae76b3cec5ad1db47 (diff)
downloadmongo-9bcb318c4c9f2c482413a9d85b7e7c99c0492653.tar.gz
SERVER-23923 Track writeConcern through getMores
Diffstat (limited to 'src/mongo/db/clientcursor.h')
-rw-r--r--src/mongo/db/clientcursor.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h
index 92f51255ed5..4694031ccc1 100644
--- a/src/mongo/db/clientcursor.h
+++ b/src/mongo/db/clientcursor.h
@@ -78,13 +78,15 @@ struct ClientCursorParams {
ClientCursorParams(std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> planExecutor,
NamespaceString nss,
UserNameIterator authenticatedUsersIter,
+ WriteConcernOptions writeConcernOptions,
repl::ReadConcernArgs readConcernArgs,
BSONObj originatingCommandObj,
LockPolicy lockPolicy,
PrivilegeVector originatingPrivileges)
: exec(std::move(planExecutor)),
nss(std::move(nss)),
- readConcernArgs(readConcernArgs),
+ writeConcernOptions(std::move(writeConcernOptions)),
+ readConcernArgs(std::move(readConcernArgs)),
queryOptions(exec->getCanonicalQuery()
? exec->getCanonicalQuery()->getQueryRequest().getOptions()
: 0),
@@ -113,6 +115,7 @@ struct ClientCursorParams {
std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> exec;
const NamespaceString nss;
std::vector<UserName> authenticatedUsers;
+ const WriteConcernOptions writeConcernOptions;
const repl::ReadConcernArgs readConcernArgs;
int queryOptions = 0;
BSONObj originatingCommandObj;
@@ -165,6 +168,10 @@ public:
return _readConcernArgs;
}
+ WriteConcernOptions getWriteConcernOptions() const {
+ return _writeConcernOptions;
+ }
+
/**
* Returns a pointer to the underlying query plan executor. All cursors manage a PlanExecutor,
* so this method never returns a null pointer.
@@ -370,6 +377,7 @@ private:
// A transaction number for this cursor, if it was provided in the originating command.
const boost::optional<TxnNumber> _txnNumber;
+ const WriteConcernOptions _writeConcernOptions;
const repl::ReadConcernArgs _readConcernArgs;
// Tracks whether dispose() has been called, to make sure it happens before destruction. It is