summaryrefslogtreecommitdiff
path: root/src/mongo/db/session.h
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2018-08-12 20:36:20 -0400
committerJudah Schvimer <judah@mongodb.com>2018-08-12 20:36:20 -0400
commit1c52af393ebc9040fbc300293835f68f827304ce (patch)
tree8954138049c5c44333adc5c87891c487d8afe885 /src/mongo/db/session.h
parent95bcc2148cc7ec3ca4f54e16c4a75bbc0f806ace (diff)
downloadmongo-1c52af393ebc9040fbc300293835f68f827304ce.tar.gz
SERVER-35866 Add state field to transaction table
Diffstat (limited to 'src/mongo/db/session.h')
-rw-r--r--src/mongo/db/session.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/session.h b/src/mongo/db/session.h
index 835d264f5a8..b617f954692 100644
--- a/src/mongo/db/session.h
+++ b/src/mongo/db/session.h
@@ -103,6 +103,8 @@ public:
* in the write's WUOW. Updates the on-disk state of the session to match the specified
* transaction/opTime and keeps the cached state in sync.
*
+ * 'txnState' is 'none' for retryable writes.
+ *
* Must only be called with the session checked-out.
*
* Throws if the session has been invalidated or the active transaction number doesn't match.
@@ -111,7 +113,8 @@ public:
TxnNumber txnNumber,
std::vector<StmtId> stmtIdsWritten,
const repl::OpTime& lastStmtIdWriteOpTime,
- Date_t lastStmtIdWriteDate);
+ Date_t lastStmtIdWriteDate,
+ boost::optional<DurableTxnStateEnum> txnState);
/**
* Helper function to begin a migration on a primary node.
@@ -236,7 +239,8 @@ private:
UpdateRequest _makeUpdateRequest(WithLock,
TxnNumber newTxnNumber,
const repl::OpTime& newLastWriteTs,
- Date_t newLastWriteDate) const;
+ Date_t newLastWriteDate,
+ boost::optional<DurableTxnStateEnum> newState) const;
void _registerUpdateCacheOnCommit(OperationContext* opCtx,
TxnNumber newTxnNumber,