summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/session_catalog.h')
-rw-r--r--src/mongo/db/session_catalog.h12
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;
};