Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-70654

Add a warning when using find during moveChunk for a hashed shard key

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Sharding EMEA 2022-11-14
    • 6

      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.

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: