diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2019-04-28 09:43:22 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2019-05-08 22:21:09 -0400 |
commit | fa878904816b984e00d980336755f762f91919c3 (patch) | |
tree | 3af69479ea26602e822987cf1e0d7fe62fd8981a /src/mongo/db/transaction_participant.cpp | |
parent | 44f49a9a97b382e07beca0d3fabf5991eb3a41fa (diff) | |
download | mongo-fa878904816b984e00d980336755f762f91919c3.tar.gz |
SERVER-40498 Writing transaction oplog entries must not take locks while holding an oplog slot.
Diffstat (limited to 'src/mongo/db/transaction_participant.cpp')
-rw-r--r-- | src/mongo/db/transaction_participant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp index 26b4e81bad0..0593fee0897 100644 --- a/src/mongo/db/transaction_participant.cpp +++ b/src/mongo/db/transaction_participant.cpp @@ -620,7 +620,7 @@ void TransactionParticipant::Participant::_setSpeculativeTransactionReadTimestam TransactionParticipant::OplogSlotReserver::OplogSlotReserver(OperationContext* opCtx, int numSlotsToReserve) - : _opCtx(opCtx) { + : _opCtx(opCtx), _globalLock(opCtx, MODE_IX) { // Stash the transaction on the OperationContext on the stack. At the end of this function it // will be unstashed onto the OperationContext. TransactionParticipant::SideTransactionBlock sideTxn(opCtx); |