[SERVER-70654] Add a warning when using find during moveChunk for a hashed shard key Created: 18/Oct/22  Updated: 29/Oct/23  Resolved: 09/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Allison Easton Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-11-14
Participants:
Story Points: 6

 Description   

In most cases, using moveChunk with find if the shard key is hashed is a user mistake (in face, our docs explicitly say not to do so). However, when a user does this, it can end up with unexpected behavior that makes debugging the problem difficult. A user tried to use sh.moveChunk on a collection with a hashed shard key, and from the user perspective nothing happened because the chunk that the move chunk command chose was already on the correct shard.

It would be helpful to users to emit some warning saying that using find with a hashed shard key is not recommended and that they should use bounds instead.



 Comments   
Comment by Githook User [ 09/Nov/22 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-70654 Add a warning when using find during moveChunk for a hashed shard key
Branch: master
https://github.com/mongodb/mongo/commit/1ccd927d11fc604fdba9112e7f53e781128b6d64

Generated at Thu Feb 08 06:16:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.