From 84a7b81a73c7abfff42823b87612c9d50ea50e67 Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Fri, 29 May 2020 13:42:09 -0400 Subject: SERVER-48407 Concurrency suites creating and dropping indexes should expect the NoMatchingDocument error code --- .../create_index_background_unique.js | 24 +++++++++++++--------- .../fsm_workloads/drop_index_during_replan.js | 6 ++++-- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'jstests/concurrency') diff --git a/jstests/concurrency/fsm_workloads/create_index_background_unique.js b/jstests/concurrency/fsm_workloads/create_index_background_unique.js index ad9e7081e40..af074da8965 100644 --- a/jstests/concurrency/fsm_workloads/create_index_background_unique.js +++ b/jstests/concurrency/fsm_workloads/create_index_background_unique.js @@ -44,16 +44,20 @@ var $config = (function() { }); // Multi-statement Transactions can fail with SnapshotUnavailable if there are // pending catalog changes as of the transaction start (see SERVER-43018). - assertWorkedOrFailedHandleTxnErrors( - res, - [ - ErrorCodes.IndexBuildAborted, - ErrorCodes.IndexBuildAlreadyInProgress, - ErrorCodes.SnapshotUnavailable, - ErrorCodes.SnapshotTooOld, - ErrorCodes.NotMaster - ], - [ErrorCodes.IndexBuildAborted, ErrorCodes.NotMaster]); + assertWorkedOrFailedHandleTxnErrors(res, + [ + ErrorCodes.IndexBuildAborted, + ErrorCodes.IndexBuildAlreadyInProgress, + ErrorCodes.SnapshotUnavailable, + ErrorCodes.SnapshotTooOld, + ErrorCodes.NoMatchingDocument, + ErrorCodes.NotMaster, + ], + [ + ErrorCodes.IndexBuildAborted, + ErrorCodes.NoMatchingDocument, + ErrorCodes.NotMaster, + ]); } function dropIndex(db, collName) { diff --git a/jstests/concurrency/fsm_workloads/drop_index_during_replan.js b/jstests/concurrency/fsm_workloads/drop_index_during_replan.js index c911079345d..f4f68e0ffb3 100644 --- a/jstests/concurrency/fsm_workloads/drop_index_during_replan.js +++ b/jstests/concurrency/fsm_workloads/drop_index_during_replan.js @@ -46,8 +46,10 @@ var $config = (function() { db[collName].dropIndex({b: 1}); // Recreate the index that was dropped. - assertAlways.commandWorkedOrFailedWithCode(db[collName].createIndex({b: 1}), - [ErrorCodes.IndexBuildAborted]); + assertAlways.commandWorkedOrFailedWithCode(db[collName].createIndex({b: 1}), [ + ErrorCodes.IndexBuildAborted, + ErrorCodes.NoMatchingDocument, + ]); } }; -- cgit v1.2.1