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

[Server] Document sharding auto-merger

    XMLWordPrintableJSON

Details

    Description

      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:

      1. Identify all the <nss, shard> pairs for which exist mergeable chunks.
      2. 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

      If a balancing window is set, the auto-merger will only work during such window.
       

      Attachments

        Activity

          People

            joseph.dougherty@mongodb.com Joseph Dougherty
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              46 weeks ago