summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/transaction_coordinator_catalog.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2018-12-12 17:58:38 -0500
committerRandolph Tan <randolph@10gen.com>2019-02-28 17:33:31 -0500
commitc5f474e0728ab6cd75e23ce9f343cc20ac3c1f14 (patch)
tree586ef9a1da73625f4ac817900bd2abca647e0a9c /src/mongo/db/s/transaction_coordinator_catalog.cpp
parent78d82f7dab0efcf651535665703ae1f80e759605 (diff)
downloadmongo-c5f474e0728ab6cd75e23ce9f343cc20ac3c1f14.tar.gz
SERVER-37972 Create suite for running multi shard jscore with sharded transactions with kill
Diffstat (limited to 'src/mongo/db/s/transaction_coordinator_catalog.cpp')
-rw-r--r--src/mongo/db/s/transaction_coordinator_catalog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/s/transaction_coordinator_catalog.cpp b/src/mongo/db/s/transaction_coordinator_catalog.cpp
index 3fa862ddde3..38e6f95cb30 100644
--- a/src/mongo/db/s/transaction_coordinator_catalog.cpp
+++ b/src/mongo/db/s/transaction_coordinator_catalog.cpp
@@ -186,7 +186,6 @@ void TransactionCoordinatorCatalog::_remove(const LogicalSessionId& lsid, TxnNum
if (MONGO_FAIL_POINT(doNotForgetCoordinator)) {
auto decisionFuture = coordinator->getDecision();
- invariant(decisionFuture.isReady());
// Only remember a coordinator that completed successfully. We expect that the
// coordinator only completes with an error if the node stepped down or was shut
// down while coordinating the commit. If either of these occurred, a
@@ -195,7 +194,7 @@ void TransactionCoordinatorCatalog::_remove(const LogicalSessionId& lsid, TxnNum
// shutdown), or should find no coordinator and instead recover the decision from
// the local participant (if the failover or shutdown occurred before any of the
// coordinator's state was made durable).
- if (decisionFuture.getNoThrow().isOK()) {
+ if (decisionFuture.isReady() && decisionFuture.getNoThrow().isOK()) {
_coordinatorsBySessionDefunct[lsid][txnNumber] = std::move(coordinator);
}
}