summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog_mongod.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-04 18:18:12 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-09 07:41:56 -0400
commit94f269a1c6053824c4dabc50e8c9219b80a6a1b5 (patch)
treec18817b020380b348172d9637021bc7dfc35a18a /src/mongo/db/session_catalog_mongod.h
parent2791817876636c0cfd60d867f31c7a83cf3f18c1 (diff)
downloadmongo-94f269a1c6053824c4dabc50e8c9219b80a6a1b5.tar.gz
SERVER-37837 Get rid of TransactionReaper (Part 2)
This change folds the TransactionReaper's single function to be part of the SessionCatalogs on MongoD and MongoS, which are the subsystems responsible for managing transactions.
Diffstat (limited to 'src/mongo/db/session_catalog_mongod.h')
-rw-r--r--src/mongo/db/session_catalog_mongod.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/session_catalog_mongod.h b/src/mongo/db/session_catalog_mongod.h
index e43c2ae84c9..e1eb6d8b4fc 100644
--- a/src/mongo/db/session_catalog_mongod.h
+++ b/src/mongo/db/session_catalog_mongod.h
@@ -33,6 +33,8 @@
namespace mongo {
+class SessionsCollection;
+
class MongoDSessionCatalog {
public:
/**
@@ -62,6 +64,14 @@ public:
*/
static void invalidateSessions(OperationContext* opCtx,
boost::optional<BSONObj> singleSessionDoc);
+
+ /**
+ * Locates session entries from the in-memory catalog and in 'config.transactions' which have
+ * not been referenced before 'possiblyExpired' and deletes them.
+ */
+ static int reapSessionsOlderThan(OperationContext* OperationContext,
+ SessionsCollection& sessionsCollection,
+ Date_t possiblyExpired);
};
/**