diff options
author | Blake Oler <blake.oler@mongodb.com> | 2018-05-07 17:40:48 -0400 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2018-05-29 11:26:11 -0400 |
commit | 52b37851285c2b5394f0a89edd0c117a8144812c (patch) | |
tree | 7620bfa27adf55eae36786b4f62256014fe5b51c /src/mongo/db/session.h | |
parent | a76082905d63ac8aaaae25e5c76812e6edf9bc07 (diff) | |
download | mongo-52b37851285c2b5394f0a89edd0c117a8144812c.tar.gz |
SERVER-33327 Don't update lastWriteDate field in Session::onMigrateCompletedOnPrimary
Diffstat (limited to 'src/mongo/db/session.h')
-rw-r--r-- | src/mongo/db/session.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/session.h b/src/mongo/db/session.h index 1c0c38f1ae3..0f4336e1165 100644 --- a/src/mongo/db/session.h +++ b/src/mongo/db/session.h @@ -206,7 +206,7 @@ public: TxnNumber txnNumber, std::vector<StmtId> stmtIdsWritten, const repl::OpTime& lastStmtIdWriteOpTime, - Date_t lastStmtIdWriteDate); + Date_t oplogLastStmtIdWriteDate); /** * Marks the session as requiring refresh. Used when the session state has been modified @@ -420,6 +420,12 @@ private: TxnNumber txnNumber, StmtId stmtId) const; + // Returns the write date of the last committed write for this session and transaction. If no + // write has completed yet, returns an empty date. + // + // Throws if the session has been invalidated or the active transaction number doesn't match. + Date_t _getLastWriteDate(WithLock, TxnNumber txnNumber) const; + UpdateRequest _makeUpdateRequest(WithLock, TxnNumber newTxnNumber, const repl::OpTime& newLastWriteTs, |