diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-09-13 20:09:04 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-09-14 14:37:06 -0400 |
commit | 3d2124a52216a469f5dbc510c660d6f6cd03184d (patch) | |
tree | a91494f3814a6f55f34fc134f4e844c942fea085 /src/mongo | |
parent | 7e8486ba84837a548f2f1470209eb204a42c293a (diff) | |
download | mongo-3d2124a52216a469f5dbc510c660d6f6cd03184d.tar.gz |
SERVER-35307 Remove verbose try-catch in prepareTransaction().
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/transaction_participant.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp index e7efc8d2308..a24a4a7df3e 100644 --- a/src/mongo/db/transaction_participant.cpp +++ b/src/mongo/db/transaction_participant.cpp @@ -591,23 +591,7 @@ Timestamp TransactionParticipant::prepareTransaction(OperationContext* opCtx, lk.unlock(); opCtx->getServiceContext()->getOpObserver()->onTransactionPrepare(opCtx, prepareOplogSlot); - // After the oplog entry is written successfully, it is illegal to implicitly abort or fail. - try { - abortGuard.Dismiss(); - - lk.lock(); - - // Although we are not allowed to abort here, we check that we don't even try to. If we do - // try to, that is a bug and we will fassert below. - _checkIsActiveTransaction(lk, *opCtx->getTxnNumber(), true); - - // Ensure that the transaction is still prepared. - invariant(_txnState.isPrepared(lk), str::stream() << "Current state: " << _txnState); - } catch (...) { - severe() << "Illegal exception after transaction was prepared."; - fassertFailedWithStatus(50906, exceptionToStatus()); - } - + abortGuard.Dismiss(); return prepareOplogSlot.opTime.getTimestamp(); } |