summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction_participant.cpp
diff options
context:
space:
mode:
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);
}