Skip to content

Commit adddc41

Browse files
authored
DOCS-16164 AutoMerger concept (#3304)
* DOCS-16164 AutoMerger concept * internal review * external review * external review * link to configureCollectionBalancing command * addresses feedback * feedback
1 parent 09bed65 commit adddc41

File tree

5 files changed

+84
-2
lines changed

5 files changed

+84
-2
lines changed

snooty.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ fts = "Atlas Search"
256256
# Automerger Constants
257257
auto-merge-upper = "AutoMerger"
258258
auto-merge-lower = "automerger"
259+
auto-merge-lower-plural = "automerger"
259260
auto-merge-action = "automerging"
261+
auto-merge-action-upper = "Automerging"
260262
# In Use Encryption Constants
261263
csfle = "Client-Side Field Level Encryption"
262264
csfle-abbrev = "CSFLE"

source/core/automerger-concept.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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

source/core/sharding-balancer-administration.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ To manage the sharded cluster balancer, see
4242

4343
/tutorial/manage-sharded-cluster-balancer
4444
/tutorial/migrate-chunks-in-sharded-cluster
45+
/core/automerger-concept
4546

4647

4748
.. _sharding-balancing-internals:

source/includes/mergeability.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ collection are **mergeable** when they meet all of these conditions:
99
snapshot reads:
1010

1111
- The last migration involving the chunk happened at least as many
12-
seconds ago as the value of ``minSnapshotHistoryWindowInSeconds``.
12+
seconds ago as the value of
13+
:parameter:`minSnapshotHistoryWindowInSeconds`.
1314
- The last migration involving the chunk happened at least as many
14-
seconds ago as the value of ``transactionLifetimeLimitSeconds``.
15+
seconds ago as the value of
16+
:parameter:`transactionLifetimeLimitSeconds`.
1517

source/reference/parameters.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,6 +3090,10 @@ Sharding Parameters
30903090
``AsyncRequestsSenderUseBaton`` and always enables the performance
30913091
enhancement controlled by the parameter.
30923092

3093+
3094+
.. _automerger-params:
3095+
3096+
30933097
.. parameter:: autoMergerIntervalSecs
30943098

30953099
.. versionadded:: 7.0
@@ -3150,6 +3154,10 @@ Sharding Parameters
31503154

31513155
db.adminCommand( { setParameter: 1, autoMergerThrottlingMS: 60000 } )
31523156

3157+
3158+
.. _balancer-sharding-params:
3159+
3160+
31533161
.. parameter:: balancerMigrationsThrottlingMs
31543162

31553163
.. versionadded:: 7.0 (*Also available starting in 6.3.1, 6.0.6, 5.0.18*)

0 commit comments

Comments
 (0)