diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2021-04-04 06:05:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-09 14:33:27 +0000 |
commit | 1ddadedeadd6029a0e26281fd6f13b0dee867d03 (patch) | |
tree | 2e525269117a48711a0966f2d595f542ab384e22 | |
parent | 7b44a3a752a09d1efe7d8dce5e4da324beab8063 (diff) | |
download | mongo-1ddadedeadd6029a0e26281fd6f13b0dee867d03.tar.gz |
SERVER-55768 Make txn_two_phase_commit_killop.js not kill prepareTransaction on the coordinator
(cherry picked from commit d3aac65e0114429242b507825183ce7224ab9901)
-rw-r--r-- | jstests/sharding/txn_two_phase_commit_killop.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jstests/sharding/txn_two_phase_commit_killop.js b/jstests/sharding/txn_two_phase_commit_killop.js index 4b363d46fad..6b37e0fde37 100644 --- a/jstests/sharding/txn_two_phase_commit_killop.js +++ b/jstests/sharding/txn_two_phase_commit_killop.js @@ -126,7 +126,17 @@ const testCommitProtocol = function(shouldCommit, failpointData) { coordinatorOpsToKill = coordinator.getDB("admin") .aggregate([ {$currentOp: {'allUsers': true, 'idleConnections': true}}, - {$match: {desc: "TransactionCoordinator"}} + { + $match: { + $and: [ + {desc: "TransactionCoordinator"}, + // Filter out the prepareTransaction op on the + // coordinator itself since killing it would + // cause the transaction to abort. + {"command.prepareTransaction": {$exists: false}} + ] + } + } ]) .toArray(); |