-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
When a migration commits, the current timestamp is always stored together with the migrated chunk. Starting from v7.0, sharding has a new component called auto-merger that is periodically taking care of scanning through such timestamps in order to spot "mergeable" chunks and then issue mergeAllChunksOnShard commands (both the definition of "mergeable" and of the new mergeAllChunksOnShard command are listed in DOCS-15976).
When the auto-merger is active, it does the following:
- Identify all the <nss, shard> pairs for which exist mergeable chunks.
- Schedule a mergeAllChunksOnShard command for each pair and wait for the operation to commit (with maxNumberOfChunksToMerge set to 1000).
New server parameters (to set on config server nodes)
Unless explicitly disabled, auto-merging will happen periodically every autoMergerIntervalSecs seconds, configurable server parameter defaulted to 1 hour. Auto-merge actions issued for the same collection will be spaced at least of autoMergerThrottlingMS seconds defaulted to 15 seconds (please, also document those new parameters).
Settings
Which parameter(s) are taken into account to decide whether auto-merging should happen for a collection?
The following settings will be considered in order of precedence
- Global balancing
- Per-collection balancing (configurable via configureCollectionBalancing)
- Global automerge
- Per-collection automerge (configurable via configureCollectionBalancing -
DOCS-15978)
If a balancing window is set, the auto-merger will only work during such window.
- is related to
-
DOCS-15976 [Server] Document `mergeAllChunksOnShard` command
- Closed
- related to
-
DOCS-16150 Release Notes / Compat Changes for automerger in v7.0
- Closed
-
DOCS-16164 Concept page for Auto-Merger
- Closed