summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorPavithra Vetriselvan <pavithra.vetriselvan@mongodb.com>2019-09-24 02:03:40 +0000
committerevergreen <evergreen@mongodb.com>2019-09-24 02:03:40 +0000
commit86792e81d6e1b348ec102bb22039d2a5e5f5d7e5 (patch)
tree9f0a3dcb6c7df33a0dce2a7737c1ea8f5bc10598 /src/mongo/db/ops
parentfc6ae12e7096f73f34969537324084b10d9c11ce (diff)
downloadmongo-86792e81d6e1b348ec102bb22039d2a5e5f5d7e5.tar.gz
SERVER-39614 replace inActiveOrKilledMultiDocumentTransaction with inMultiDocumentTransaction
(cherry picked from commit 53bdef48cc8a14c23afc2223c9a8826a0f587ac7)
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/write_ops_exec.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp
index 685672de251..dedb2683898 100644
--- a/src/mongo/db/ops/write_ops_exec.cpp
+++ b/src/mongo/db/ops/write_ops_exec.cpp
@@ -246,7 +246,7 @@ bool handleError(OperationContext* opCtx,
}
auto txnParticipant = TransactionParticipant::get(opCtx);
- if (txnParticipant && txnParticipant.inActiveOrKilledMultiDocumentTransaction()) {
+ if (txnParticipant && txnParticipant.inMultiDocumentTransaction()) {
if (isTransientTransactionError(
ex.code(), false /* hasWriteConcernError */, false /* isCommitTransaction */)) {
// Tell the client to try the whole txn again, by returning ok: 0 with errorLabels.
@@ -400,7 +400,7 @@ bool insertBatchAndHandleErrors(OperationContext* opCtx,
try {
acquireCollection();
auto txnParticipant = TransactionParticipant::get(opCtx);
- auto inTxn = txnParticipant && txnParticipant.inActiveOrKilledMultiDocumentTransaction();
+ auto inTxn = txnParticipant && txnParticipant.inMultiDocumentTransaction();
if (!collection->getCollection()->isCapped() && !inTxn && batch.size() > 1) {
// First try doing it all together. If all goes well, this is all we need to do.
// See Collection::_insertDocuments for why we do all capped inserts one-at-a-time.
@@ -491,7 +491,7 @@ WriteResult performInserts(OperationContext* opCtx,
// transaction.
auto txnParticipant = TransactionParticipant::get(opCtx);
invariant(!opCtx->lockState()->inAWriteUnitOfWork() ||
- (txnParticipant && txnParticipant.inActiveOrKilledMultiDocumentTransaction()));
+ (txnParticipant && txnParticipant.inMultiDocumentTransaction()));
auto& curOp = *CurOp::get(opCtx);
ON_BLOCK_EXIT([&] {
// This is the only part of finishCurOp we need to do for inserts because they reuse the
@@ -758,7 +758,7 @@ WriteResult performUpdates(OperationContext* opCtx, const write_ops::Update& who
// transaction.
auto txnParticipant = TransactionParticipant::get(opCtx);
invariant(!opCtx->lockState()->inAWriteUnitOfWork() ||
- (txnParticipant && txnParticipant.inActiveOrKilledMultiDocumentTransaction()));
+ (txnParticipant && txnParticipant.inMultiDocumentTransaction()));
uassertStatusOK(userAllowedWriteNS(wholeOp.getNamespace()));
DisableDocumentValidationIfTrue docValidationDisabler(
@@ -915,7 +915,7 @@ WriteResult performDeletes(OperationContext* opCtx, const write_ops::Delete& who
// transaction.
auto txnParticipant = TransactionParticipant::get(opCtx);
invariant(!opCtx->lockState()->inAWriteUnitOfWork() ||
- (txnParticipant && txnParticipant.inActiveOrKilledMultiDocumentTransaction()));
+ (txnParticipant && txnParticipant.inMultiDocumentTransaction()));
uassertStatusOK(userAllowedWriteNS(wholeOp.getNamespace()));
DisableDocumentValidationIfTrue docValidationDisabler(