summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2019-05-10 15:59:06 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2019-05-13 11:07:26 -0400
commit9a77424deeae44452042eed2c50747bd127b1b48 (patch)
tree5f3bc02ebf97fa4d0ce7943dcbdbdead5a17b475 /jstests/concurrency
parentbdaf2c9b3db159d2a28f214a5219a390b060c02c (diff)
downloadmongo-9a77424deeae44452042eed2c50747bd127b1b48.tar.gz
Revert "SERVER-40996 abortTransaction in cleanup_txns.js does not handle different errors from different shards"
This reverts commit ba844b4e81c3914b8a7017bd2a8c5ac4231c72ff. SERVER-40757 Fix snapshot_read_kill_operations.js to handle read-only transactions that are aborted The commit for SERVER-38369 made commands that return raw shard responses return the first non-ignorable error as the top-level error, even if different non-ignorable errors occurred.
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_workload_helpers/cleanup_txns.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js b/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js
index 34a9bc0dab7..9fb5a3f9a8d 100644
--- a/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js
+++ b/jstests/concurrency/fsm_workload_helpers/cleanup_txns.js
@@ -26,19 +26,8 @@ function abortTransaction(sessionAwareDB, txnNumber) {
autocommit: false
};
const res = rawDB.adminCommand(abortCmd);
- if (res.hasOwnProperty("raw")) {
- // For sharded commands, we may get mismatched errors in which case there will be
- // no top-level code. Instead, check each code from the shards.
- for (let shardname in res.raw) {
- let shardres = res.raw[shardname];
- assert.commandWorkedOrFailedWithCode(
- shardres, abortErrorCodes, () => `cmd: ${tojson(abortCmd)}`);
- }
- return res;
- } else {
- return assert.commandWorkedOrFailedWithCode(
- res, abortErrorCodes, () => `cmd: ${tojson(abortCmd)}`);
- }
+ return assert.commandWorkedOrFailedWithCode(
+ res, abortErrorCodes, () => `cmd: ${tojson(abortCmd)}`);
}
/**