diff options
author | Benety Goh <benety@mongodb.com> | 2022-08-27 07:02:35 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-27 11:36:07 +0000 |
commit | 54360d58bf4bbef694b40898097e0761fbf483cf (patch) | |
tree | bc98e324472f45694de1b52e6b42256359b6551d /src/mongo/db/transaction | |
parent | f5f8acab2eec0be83d94cb8126bccf2bd1522350 (diff) | |
download | mongo-54360d58bf4bbef694b40898097e0761fbf483cf.tar.gz |
SERVER-68215 add MongoDSessionCatalogTransactionInterface::refreshTransactionFromStorageIfNeeded()
Diffstat (limited to 'src/mongo/db/transaction')
-rw-r--r-- | src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.cpp | 12 | ||||
-rw-r--r-- | src/mongo/db/transaction/session_catalog_mongod_transaction_interface_impl.h | 4 |
2 files changed, 16 insertions, 0 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 3dad0360eb9..b6a74b562c7 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 @@ -37,6 +37,18 @@ namespace mongo { +void MongoDSessionCatalogTransactionInterfaceImpl::refreshTransactionFromStorageIfNeeded( + OperationContext* opCtx) { + auto txnParticipant = TransactionParticipant::get(opCtx); + txnParticipant.refreshFromStorageIfNeeded(opCtx); +} + +void MongoDSessionCatalogTransactionInterfaceImpl:: + refreshTransactionFromStorageIfNeededNoOplogEntryFetch(OperationContext* opCtx) { + auto txnParticipant = TransactionParticipant::get(opCtx); + txnParticipant.refreshFromStorageIfNeededNoOplogEntryFetch(opCtx); +} + void MongoDSessionCatalogTransactionInterfaceImpl::abortTransaction( OperationContext* opCtx, const SessionTxnRecord& txnRecord) { auto txnParticipant = TransactionParticipant::get(opCtx); 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 0104ae730fb..ad61484777d 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 @@ -47,6 +47,10 @@ public: MongoDSessionCatalogTransactionInterfaceImpl() = default; virtual ~MongoDSessionCatalogTransactionInterfaceImpl() = default; + void refreshTransactionFromStorageIfNeeded(OperationContext* opCtx) override; + + void refreshTransactionFromStorageIfNeededNoOplogEntryFetch(OperationContext* opCtx) override; + void abortTransaction(OperationContext* opCtx, const SessionTxnRecord& txnRecord) override; void invalidateSessionToKill(OperationContext* opCtx, const SessionToKill& session) override; |