[DOCS-15976] [Server] Document `mergeAllChunksOnShard` command Created: 22/Mar/23 Updated: 13/Nov/23 Resolved: 08/Jun/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113 |
| Type: | Task | Priority: | Major - P3 |
| 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: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Days since reply: | 46 weeks ago | ||||||||||||||||
| Epic Link: | DOCSP-26284 | ||||||||||||||||
| Description |
|
Starting from v7.0, the mergeAllChunksOnShard command is available on routers. The command take care of squashing at once all "mergeable" chunks that a shard owns for a given collection. Definition or mergeable chunks Two or more contiguous non-jumbo chunks belonging to the same collection are going to be considered mergeable when they are owned by the same shard and their history can be safely purged without breaking transactions and snapshot reads. Technically, this means that each chunk is required to fulfill the following conditions to be mergeable:
Jumbo chunks are not considered mergeable because they cannot participate in migrations. Parameters of the command The command is accepting the following parameters:
Example NB: the following example assumes that history is empty for all chunks and no chunk is flagged as jumbo, so all contiguous intervals belonging to the same shard are mergeable. Let's considering the following portion of chunks belonging to a collection coll with shard key x:
The chunks for coll after invoking the 2 above-mentioned commands will look like this:
|