summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2018-09-24 10:26:41 -0400
committerjannaerin <golden.janna@gmail.com>2018-09-24 17:30:01 -0400
commitbe8fffcd62e8af2e05597cad96941429a0990f4d (patch)
tree0a9f3d0abfe4d357bd9a3b23c0053a2788d2b3cb /jstests/concurrency
parentcd533253819148e71a5e7c772ea484aafcbbf2e2 (diff)
downloadmongo-be8fffcd62e8af2e05597cad96941429a0990f4d.tar.gz
SERVER-37254 Retry on CursorNotFound error in multi_statement_transaction_kill_sessions_atomicity_isolation FSM workload
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js3
-rw-r--r--jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js b/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
index 402f59cc124..f3417932965 100644
--- a/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
+++ b/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
@@ -67,7 +67,8 @@ var {withTxnAndAutoRetry} = (function() {
if ((e.hasOwnProperty('errorLabels') &&
e.errorLabels.includes('TransientTransactionError')) ||
(retryOnKilledSession &&
- (e.code === ErrorCodes.Interrupted || e.code === ErrorCodes.CursorKilled))) {
+ (e.code === ErrorCodes.Interrupted || e.code === ErrorCodes.CursorKilled ||
+ e.code == ErrorCodes.CursorNotFound))) {
hasTransientError = true;
continue;
}
diff --git a/jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js b/jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
index 042b00ae3c7..4c66bdbb6ce 100644
--- a/jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
+++ b/jstests/concurrency/fsm_workloads/multi_statement_transaction_kill_sessions_atomicity_isolation.js
@@ -39,7 +39,8 @@ var $config = extendWorkload($config, ($config, $super) => {
res = db.runCommand({killSessions: [{id: sessionUUID}]});
assertAlways.commandWorked(res);
} catch (e) {
- if (e.code == ErrorCodes.Interrupted || e.code == ErrorCodes.CursorKilled) {
+ if (e.code == ErrorCodes.Interrupted || e.code == ErrorCodes.CursorKilled ||
+ e.code == ErrorCodes.CursorNotFound) {
// This session was killed when running either listSessions or killSesssions.
// We should retry.
ourSessionWasKilled = true;