summaryrefslogtreecommitdiff
path: root/src/mongo/db/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/session.h')
-rw-r--r--src/mongo/db/session.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mongo/db/session.h b/src/mongo/db/session.h
index f21309ffa8e..fbfb3c5f6c3 100644
--- a/src/mongo/db/session.h
+++ b/src/mongo/db/session.h
@@ -33,7 +33,7 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/logical_session_id.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/session_txn_record.h"
#include "mongo/db/transaction_history_iterator.h"
namespace mongo {
@@ -64,6 +64,18 @@ public:
}
/**
+ * Update the txnNum and lastWriteOpTimeTs of the session record. Will create a new entry if the
+ * record with corresponding sessionId does not exist.
+ *
+ * Outside callers should use saveTxnProgress instead of this when running as primary and
+ * serving a user request.
+ */
+ static void updateSessionRecord(OperationContext* opCtx,
+ const LogicalSessionId& sessionId,
+ const TxnNumber& txnNum,
+ const Timestamp& ts);
+
+ /**
* Load transaction state from storage if it hasn't.
*/
void begin(OperationContext* opCtx, const TxnNumber& txnNumber);