[DOCS-15363] Publicly document `moveRange` command Created: 26/May/22  Updated: 13/Nov/23  Due: 08/Oct/22  Resolved: 07/Oct/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: 6.0.0
Fix Version/s: 6.0.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Critical - P2
Reporter: Pierlauro Sciarelli Assignee: Joseph Dougherty
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by DOCS-15332 Investigate changes in SERVER-64195: ... Closed
Gantt Dependency
has to be done before DOCS-15340 [Server] Document change of balancing... Closed
Problem/Incident
causes DOCS-16004 [Server] Add command name in `moveRan... Closed
Related
related to SERVER-66805 Change public-facing `moveRange::forc... Closed
Participants:
Days since reply: 1 year, 8 weeks, 2 days ago
Epic Link: DOCSP-19446

 Description   

Starting from v6.0.0, sharded clusters introduce the moveRange command. The purpose of this ticket is to document the moveRange command that will replace moveChunk.

The command offers:

  • All the capabilities of moveChunk command
  • The possibility to move a sub-range of a chunk

Constraints:

  • min and max need to either fit the boundaries of a chunk or be a sub-range of an existing chunk. It is not allowed to invoke moveRange on a range spanning multiple chunks.

The command is accepting the following parameters:

  • toShard: ID of the recipient shard
  • min: the min key of the range to move
  • max [optional]: the max key of the range to move. If not specified, given a chunk C including the shard key min, max is going to be automatically calculated as follows:
    • If the data size of the range between min and max(C) is less than the per-collection chunk size (if set) or the default chunk size , then the chunk's max is going to be selected as max = max(C)
    • Otherwise, key max < max(C) where max(C) depends on the configured chunk size
  • forceJumbo [optional]: if set to true, force jumbo chunk/range move. The default value is false.
  • waitForDelete [optional]: if set to true, wait for the chunk migration to finish before returning. The default value is false.
  • writeConcern [optional]: (default = majority)
  • secondaryThrottle [optional]: if set to true, wait for writeConcern of secondaries to acknowledge data moving. The default value is false.

Examples

All the following examples are considering a sharded collection with shard key x, configured chunk size 128MB, and a chunk with boundaries [x: 0, x: 100).

Both boundaries specified
  • User can call moveRange with min = 0, max = 100 (behavior equivalent to moveChunk)
  • User can call moveRange with min>=0 && max <=100 (new behavior, potentially resulting in splits + move):
    • E.g. moveRange with min = 10, max = 30 will create 3 chunks and move the middle one to the recipient: [x: 0, x: 10), [x: 10, x: 30), [x: 30, x: 100)
    • E.g. moveRange with min = 0, max = 20 will create 2 chunks and move the left one to the recipient: [x: 0, x: 20), [x: 20, x: 100)
    • E.g. moveRange with min = 40, max = 100 will create 2 chunks and move the right one to the recipient: [x: 0, x: 40), [x: 40, x: 100)
Only min specified (max will be calculated)
  • User can call moveRange with 0 <= min < 100
    • E.g. moveRange with min = 0, assuming less than 128MB contained between keys x: 0 and x:100: equivalent to moveChunk, will move the whole chunk on the recipient
    • E.g. moveRange with min = 10, assuming less than 128MB contained between keys x: 10 and x:100: will create 2 chunks and move the right one on the recipient: [x: 0, x: 10), [x: 10, x: 100)
    • E.g. moveRange with min = 10, assuming 128MB contained between keys x: 10 and x:30: will create 3 chunks and move the middle one on the recipient: [x: 0, x: 10), [x: 10, x: 30), [x: 30, x: 100)


 Comments   
Comment by Githook User [ 12/Dec/22 ]

Author:

{'name': 'jmd-mongo', 'email': '73852296+jmd-mongo@users.noreply.github.com', 'username': 'jmd-mongo'}

Message: DOCS-15363 documents moveRange (#1947)

  • documents moveRange
  • review feedback
  • restores moveChunk() method
  • cleanup
  • toShard
  • removes moveChunk
  • updates
  • revert 2.6
  • revert
  • review feedback
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'jmd-mongo', 'email': '73852296+jmd-mongo@users.noreply.github.com', 'username': 'jmd-mongo'}

Message: DOCS-15363 documents moveRange (#1947) (#1986)

  • documents moveRange
  • review feedback
  • restores moveChunk() method
  • cleanup
  • toShard
  • removes moveChunk
  • updates
  • revert 2.6
  • revert
  • review feedback
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'jmd-mongo', 'email': '73852296+jmd-mongo@users.noreply.github.com', 'username': 'jmd-mongo'}

Message: DOCS-15363 documents moveRange (#1947) (#1985)

  • documents moveRange
  • review feedback
  • restores moveChunk() method
  • cleanup
  • toShard
  • removes moveChunk
  • updates
  • revert 2.6
  • revert
  • review feedback
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'jmd-mongo', 'email': '73852296+jmd-mongo@users.noreply.github.com', 'username': 'jmd-mongo'}

Message: DOCS-15363 documents moveRange (#1947)

  • documents moveRange
  • review feedback
  • restores moveChunk() method
  • cleanup
  • toShard
  • removes moveChunk
  • updates
  • revert 2.6
  • revert
  • review feedback
Generated at Thu Feb 08 08:12:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.