diff options
Diffstat (limited to 'src/mongo/db/clientcursor.h')
-rw-r--r-- | src/mongo/db/clientcursor.h | 10 |
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 |