[SERVER-51064] Make "Destination shard cannot be the same as source" an acceptable error in random_moveChunk_index_operations.js Created: 18/Sep/20  Updated: 29/Oct/23  Resolved: 17/Nov/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.8.1, 4.4.15

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2020-11-02, Sharding 2020-11-16, Sharding 2020-11-30
Participants:
Linked BF Score: 10

 Description   

random_moveChunk_index_operations.js currently throws when it encounters error message "Destination shard cannot be the same as source".

However, this error will occur if another worker thread has already moved the chunk to the destination shard (random_moveChunk_refine_collection_shard_key.js already notes this)



 Comments   
Comment by Liubov Molchanova [ 18/May/22 ]

Requesting Backport as the failure reproduced in BFG-1182355 on v5.0.

Comment by Githook User [ 05/May/22 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-51064 Make mongos return early if chunk is already in the requested destination

(cherry picked from commit bf91c0fd4c55c3f2ef3c38d205671ef5801eea5c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/3269983ca235ae7d9075dff8f3de33cc133ca409

Comment by Githook User [ 16/Nov/20 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-51064 Make mongos return early if chunk is already in the requested destination
Branch: master
https://github.com/mongodb/mongo/commit/bf91c0fd4c55c3f2ef3c38d205671ef5801eea5c

Comment by Max Hirschhorn [ 21/Sep/20 ]

One thought to avoid perpetually needing to maintain the same list in multiple places would be to move the

(err.message &&
 (err.message.includes("CommandFailed") ||
  err.message.includes("Documents in target range may still be in use") ||
  // This error will occur if another worker thread has already moved the chunk to the
  // destination shard.
  err.message.includes("Destination shard cannot be the same as source")));

logic from the random_moveChunk_refine_collection_shard_key.js FSM workload into the random_moveChunk_base.js FSM workload and make it non-configurable. This is because all of the FSM workloads which extend random_moveChunk_base.js specify the first two cases and the Evergreen failure was caused by omitting the third case.

The $config.data.isMoveChunkErrorAcceptable() function would then only be used for defined the additional expected moveChunk errors that are caused by whatever else is happening in that particular FSM workload concurrently with the moveChunk operation.

Generated at Thu Feb 08 05:24:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.