diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2019-03-25 18:10:31 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2019-03-26 15:47:40 -0400 |
commit | aaa404d9d7e56a1d327f72e505f4e67b4a821959 (patch) | |
tree | 9214371bafd5b3aa066997073e358344900e8c63 /jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js | |
parent | 931cd881e9a5296e5492b2e6cc15c518585deba9 (diff) | |
download | mongo-aaa404d9d7e56a1d327f72e505f4e67b4a821959.tar.gz |
SERVER-39477 random_moveChunk workloads should tolerate failed migrations because chunk's range is in use on recipient
Diffstat (limited to 'jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js')
-rw-r--r-- | jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js b/jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js index 09f33544464..c3e6fedba5c 100644 --- a/jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js +++ b/jstests/concurrency/fsm_workloads/random_moveChunk_broadcast_update_transaction.js @@ -26,11 +26,20 @@ var $config = extendWorkload($config, function($config, $super) { // A moveChunk may fail with a WriteConflict when clearing orphans on the destination shard if // any of them are concurrently written to by a broadcast transaction operation. The error - // message may be different depending on where the failure occurs. - // TODO SERVER-39141: Remove once the range deleter retries on write conflict exceptions. + // message and top-level code may be different depending on where the failure occurs. + // + // TODO SERVER-39141: Don't ignore WriteConflict error message once the range deleter retries on + // write conflict exceptions. + // + // Additionally, because updates don't have a shard filter stage, a migration may fail if a + // broadcast update is operating on orphans from a previous migration in the range being + // migrated back in. The particular error code is replaced with a more generic one, so this is + // identified by the failed migration's error message. $config.data.isMoveChunkErrorAcceptable = (err) => { - return err.message && (err.message.indexOf("WriteConflict") > -1 || - err.message.indexOf("CommandFailed") > -1); + return err.message && + (err.message.indexOf("WriteConflict") > -1 || + err.message.indexOf("CommandFailed") > -1 || + err.message.indexOf("Documents in target range may still be in use") > -1); }; /** |