Integrate auto-merging within the balancer

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20
    • 135
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Make the balancer rely on the command path introduced by SERVER-72278 in order to issue mergeAllChunksOnShard on shards.

      The execution of the auto-merging path must be conditional on the value of the auto merger feature flag.
      Auto-merging must happen:

      • When the balancer gets enabled
      • Every X hours after the last execution, configurable via a new server parameter defaulted to 24 hours. There is no need to track on disk the last time auto-merging happened, we could simply track an in-memory state cleared up when the balancer gets disabled.

      The balancer should simply catch and ignore CommandNotFound errors that may be thrown in case of this super-improbable flow:

      1. Balancer checks FCV and feature flag, check passes
      2. FCV changes
      3. Shard binaries are replaced
      4. Balancer issues mergeAllChunksOnShard

            Assignee:
            Silvia Surroca
            Reporter:
            Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: