|
| 1 | +.. _automerger-concept: |
| 2 | + |
| 3 | +======================== |
| 4 | +The {+auto-merge-upper+} |
| 5 | +======================== |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +Starting in MongoDB 7.0, the balancer can automatically merge chunks |
| 16 | +that meet the :ref:`mergeability requirements <mergeability-concept>`. |
| 17 | + |
| 18 | +Behavior |
| 19 | +-------- |
| 20 | + |
| 21 | +The {+auto-merge-upper+} runs in the background as part of balancing |
| 22 | +operations. For most use cases, the default settings perform well. For |
| 23 | +details on which settings to customize for your deployment, see |
| 24 | +:ref:`{+auto-merge-upper+} Policy <automerge-policy-settings>`. |
| 25 | + |
| 26 | +When the {+auto-merge-upper+} runs, it squashes together all sequences |
| 27 | +of mergeable chunks for each shard of each collection. |
| 28 | + |
| 29 | +{+auto-merge-upper+} Policy |
| 30 | +``````````````````````````` |
| 31 | + |
| 32 | +.. _automerge-policy-settings: |
| 33 | + |
| 34 | +Unless explicitly disabled, the {+auto-merge-upper+} starts the first |
| 35 | +time the balancer is enabled and pauses for the next |
| 36 | +:parameter:`autoMergerIntervalSecs` after the routine drains. |
| 37 | + |
| 38 | +When {+auto-merge-upper+} is enabled, {+auto-merge-action+} happens |
| 39 | +every :parameter:`autoMergerIntervalSecs` seconds. |
| 40 | + |
| 41 | +For a given collection, {+auto-merge-upper+} guarantees that subsequent |
| 42 | +merges are delayed at least the amount specified by |
| 43 | +:parameter:`autoMergerThrottlingMS`. |
| 44 | + |
| 45 | +If a :ref:`balancing window <sharding-schedule-balancing-window>` is |
| 46 | +set, {+auto-merge-upper+} only runs during the window. |
| 47 | + |
| 48 | +Balancing Settings Precedence |
| 49 | +````````````````````````````` |
| 50 | +{+auto-merge-action-upper+} happens as part of balancing operations. |
| 51 | +In order to decide if and when to execute {+auto-merge-lower-plural+}, |
| 52 | +the settings are taken into account in this order: |
| 53 | + |
| 54 | +#. Global :ref:`balancing settings <balancer-sharding-params>` |
| 55 | +#. Per-collection balancing settings (configured by :dbcommand:`configureCollectionBalancing`) |
| 56 | +#. Global :ref:`{+auto-merge-upper+} settings <automerger-params>` |
| 57 | +#. Per-collection {+auto-merge-upper+} settings (configured by :dbcommand:`configureCollectionBalancing`) |
| 58 | + |
| 59 | +Details |
| 60 | +------- |
| 61 | + |
| 62 | +.. _mergeability-concept: |
| 63 | + |
| 64 | +.. include:: /includes/mergeability.rst |
| 65 | + |
| 66 | +Example |
| 67 | +------- |
| 68 | + |
| 69 | +.. include:: /includes/mergeAllChunksOnShard-example.rst |
0 commit comments