summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction_participant.cpp
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2020-08-25 16:07:00 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-02 22:38:20 +0000
commit6b3e341703b781bb1ff7b1263406a0f1d28dd77c (patch)
tree0b5067fd45609a3edac86956105b60f6fe2afa28 /src/mongo/db/transaction_participant.cpp
parent30e0f2a2b33a9b87259ac4c8a9e19518e2b8e1a3 (diff)
downloadmongo-6b3e341703b781bb1ff7b1263406a0f1d28dd77c.tar.gz
SERVER-50365 Use short WT transaction rollback timeout in the multi-document transaction expirer thread
Diffstat (limited to 'src/mongo/db/transaction_participant.cpp')
-rw-r--r--src/mongo/db/transaction_participant.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp
index f4e650b47f3..d3772edb7db 100644
--- a/src/mongo/db/transaction_participant.cpp
+++ b/src/mongo/db/transaction_participant.cpp
@@ -830,6 +830,10 @@ void TransactionParticipant::TxnResources::release(OperationContext* opCtx) {
readConcernArgs = _readConcernArgs;
}
+void TransactionParticipant::TxnResources::setNoEvictionAfterRollback() {
+ _recoveryUnit->setNoEvictionAfterRollback();
+}
+
TransactionParticipant::SideTransactionBlock::SideTransactionBlock(OperationContext* opCtx)
: _opCtx(opCtx) {
// Do nothing if we are already in a SideTransactionBlock. We can tell we are already in a
@@ -1662,6 +1666,9 @@ void TransactionParticipant::Participant::_abortTransactionOnSession(OperationCo
: TransactionState::kAbortedWithoutPrepare;
stdx::lock_guard<Client> lk(*opCtx->getClient());
+ if (o().txnResourceStash && opCtx->recoveryUnit()->getNoEvictionAfterRollback()) {
+ o(lk).txnResourceStash->setNoEvictionAfterRollback();
+ }
_resetTransactionState(lk, nextState);
}