diff options
Diffstat (limited to 'jstests/concurrency')
-rw-r--r-- | jstests/concurrency/fsm_workloads/random_moveChunk_update_shard_key.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/concurrency/fsm_workloads/random_moveChunk_update_shard_key.js b/jstests/concurrency/fsm_workloads/random_moveChunk_update_shard_key.js index 30d33f6f188..c034b8d06dc 100644 --- a/jstests/concurrency/fsm_workloads/random_moveChunk_update_shard_key.js +++ b/jstests/concurrency/fsm_workloads/random_moveChunk_update_shard_key.js @@ -29,8 +29,15 @@ var $config = extendWorkload($config, function($config, $super) { // identified by the failed migration's error message. $config.data.isMoveChunkErrorAcceptable = (err) => { return err.message && - (err.message.indexOf("CommandFailed") > -1 || - err.message.indexOf("Documents in target range may still be in use")); + (err.message.includes("CommandFailed") || + err.message.includes("Documents in target range may still be in use") || + // This error can occur when the test updates the shard key value of a document whose + // chunk has been moved to another shard. Receiving a chunk only waits for documents + // with shard key values in that range to have been cleaned up by the range deleter. + // So, if the range deleter has not yet cleaned up that document when the chunk is + // moved back to the original shard, the moveChunk may fail as a result of a duplicate + // key error on the recipient. + err.message.includes("Location51008")); }; $config.data.runningWithStepdowns = |