diff options
author | James Wahlin <james@mongodb.com> | 2018-02-13 15:54:53 -0500 |
---|---|---|
committer | James Wahlin <james@mongodb.com> | 2018-02-16 16:52:04 -0500 |
commit | fa4dd67345feba2a7d6a84e589e3ffd3fca75b2a (patch) | |
tree | 2c8e15233d9f37dd9cdbf15e52e21f1a8bdb2a7c /src/mongo/db/session_catalog.h | |
parent | 7aaacb4e7ce9ca7f3883679283ea095ea8d363eb (diff) | |
download | mongo-fa4dd67345feba2a7d6a84e589e3ffd3fca75b2a.tar.gz |
SERVER-33223 Add transaction resource stash
Diffstat (limited to 'src/mongo/db/session_catalog.h')
-rw-r--r-- | src/mongo/db/session_catalog.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/session_catalog.h b/src/mongo/db/session_catalog.h index 6aa4e4d0442..0451147f786 100644 --- a/src/mongo/db/session_catalog.h +++ b/src/mongo/db/session_catalog.h @@ -251,6 +251,18 @@ public: static Session* get(OperationContext* opCtx); + /** + * Stash the Locker and RecoveryUnit if both: + * - The current session represents a transaction running in snapshot isolation. + * - The current operation is ending with an open client cursor. + */ + void stashTransactionResources(); + + /** + * Restore the stashed Locker and RecoveryUnit for the current transaction, if they exist. + */ + void unstashTransactionResources(); + private: OperationContext* const _opCtx; }; |