Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15728

[Server] Add warning to sh.moveChunk that this method should not be used with a hashed shard key

      The move chunk command can be used either with a query option or a bounds option. The query option should be used for regular shard keys while bounds should be used for hashed shard keys. This is already documented correctly in the moveChunk page of the docs.

      The sh.moveChunk helper only allows the use of the query option. This isn't really documented well, and so users that go to this page rather than the moveChunk page often don't realize that sh.moveChunk should not be used with hashed shard keys.

      I propose adding a warning to the description of the command. The first paragraph can be changed by adding to the end something similar to: "This command uses the find option from the moveChunk command, and should not be used for hashed shard keys. To move a chunk with a hashed shard key, use the moveChunk command specifying the bounds field."

            Assignee:
            lindsey.moore@mongodb.com Lindsey Moore
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 13 weeks, 1 day ago