diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-06-26 17:30:16 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-07-12 15:32:49 -0400 |
commit | 32ce928cb3275bb3de7c1e1ccc99d3c1e57cdc72 (patch) | |
tree | fdf47bdbf89faec183b05ab48b3a898923b94bf6 /src/mongo/db/session_catalog.h | |
parent | 4b9d69eb00361083ce835d42c4107a4caa52f6fc (diff) | |
download | mongo-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.h | 11 |
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)) {} |