summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2022-08-26 08:05:37 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-26 12:36:52 +0000
commitacf81f84dabf486f74a84b99f04cd17efa35424f (patch)
tree2436bc8af76ffdf0741ec498758a7c43c89f4159 /src/mongo/db/transaction
parent70fc032f8e809a74c59934ec70a29b1df3d1e8cc (diff)
downloadmongo-acf81f84dabf486f74a84b99f04cd17efa35424f.tar.gz
SERVER-68215 add MongoDSessionCatalogTransactionInterface::invalidateSessionToKill()
Diffstat (limited to 'src/mongo/db/transaction')
-rw-r--r--src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.cpp12
-rw-r--r--src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.cpp b/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.cpp
index a1f9ef06b89..3c570f34a48 100644
--- a/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.cpp
+++ b/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.cpp
@@ -29,4 +29,14 @@
#include "mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h"
-namespace mongo {} // namespace mongo
+#include "mongo/db/transaction/transaction_participant.h"
+
+namespace mongo {
+
+void MongoDSessionCatalogTransactionInterfaceImpl::invalidateSessionToKill(
+ OperationContext* opCtx, const SessionToKill& session) {
+ auto participant = TransactionParticipant::get(session);
+ participant.invalidate(opCtx);
+}
+
+} // namespace mongo
diff --git a/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h b/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h
index b29427ba5c5..6d7751cb885 100644
--- a/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h
+++ b/src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h
@@ -46,6 +46,8 @@ class MongoDSessionCatalogTransactionInterfaceImpl
public:
MongoDSessionCatalogTransactionInterfaceImpl() = default;
virtual ~MongoDSessionCatalogTransactionInterfaceImpl() = default;
+
+ void invalidateSessionToKill(OperationContext* opCtx, const SessionToKill& session) override;
};
} // namespace mongo