summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog.h
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-06-26 17:30:16 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-07-12 15:32:49 -0400
commit32ce928cb3275bb3de7c1e1ccc99d3c1e57cdc72 (patch)
treefdf47bdbf89faec183b05ab48b3a898923b94bf6 /src/mongo/db/session_catalog.h
parent4b9d69eb00361083ce835d42c4107a4caa52f6fc (diff)
downloadmongo-32ce928cb3275bb3de7c1e1ccc99d3c1e57cdc72.tar.gz
SERVER-29531 Handle rollbacks in SessionTransactionTable
Diffstat (limited to 'src/mongo/db/session_catalog.h')
-rw-r--r--src/mongo/db/session_catalog.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/session_catalog.h b/src/mongo/db/session_catalog.h
index 3d77f64a249..c6a67f6c44c 100644
--- a/src/mongo/db/session_catalog.h
+++ b/src/mongo/db/session_catalog.h
@@ -60,6 +60,12 @@ public:
static void create(ServiceContext* service);
/**
+ * Resets the transaction table on the specified service context to an uninitialized state.
+ * Meant only for testing.
+ */
+ static void reset_forTest(ServiceContext* service);
+
+ /**
* Retrieves the session transaction table associated with the service or operation context.
* Must only be called after 'create' has been called.
*/
@@ -86,6 +92,11 @@ public:
*/
ScopedSession checkOutSession(OperationContext* opCtx);
+ /**
+ * Clears the entire transaction table. Invoked after rollback.
+ */
+ void clearTransactionTable();
+
private:
struct SessionRuntimeInfo {
SessionRuntimeInfo(LogicalSessionId lsid) : txnState(std::move(lsid)) {}