Skip to content

Commit 3467a6b

Browse files
authored
DOCS-15978 document enableAutoMerger param in configureCollectionBalancing (#3332)
* DOCS-15978 document enableAutoMerger param in configureCollectionBalancing * internal review feedback * external review feedback
1 parent 9688b95 commit 3467a6b

File tree

1 file changed

+45
-10
lines changed

1 file changed

+45
-10
lines changed

source/reference/command/configureCollectionBalancing.txt

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The command has the following syntax:
3434
configureCollectionBalancing: "<db>.<collection>",
3535
chunkSize: <num>,
3636
defragmentCollection: <bool>
37+
enableAutoMerger: <bool>
3738
}
3839
)
3940

@@ -44,22 +45,33 @@ Command Fields
4445

4546
.. list-table::
4647
:header-rows: 1
47-
:widths: 20 20 80
48+
:widths: 20 20 20 40
4849

4950
* - Field
5051
- Type
52+
- Necessity
5153
- Description
5254
* - ``configureCollectionBalancing``
5355
- string
54-
- Required: The name of the database and sharded collection to
55-
configure.
56+
- Required
57+
- The name of the database and sharded collection to configure.
5658
* - ``chunkSize``
5759
- integer
58-
- Optional: Sets the chunk size in MiB for the collection. The
59-
recommended size is 256, 512, or larger.
60+
- Optional
61+
- Sets the chunk size in MiB for the collection. The
62+
recommended size is 256, 512, or larger. For details on default
63+
behavior, see :ref:`chunksize-not-specified`.
6064
* - ``defragmentCollection``
6165
- boolean
62-
- Optional: Causes the balancer to defragment the collection.
66+
- Optional
67+
- Causes the balancer to defragment the collection.
68+
Defaults to ``false``.
69+
* - ``enableAutoMerger``
70+
- boolean
71+
- Optional
72+
- Whether or not the :ref:`{+auto-merge-upper+}
73+
<automerger-concept>` takes this collection into account.
74+
Defaults to ``true``.
6375

6476

6577
For more information, see :ref:`Data Partitioning with Chunks
@@ -74,15 +86,17 @@ To learn about defragmenting sharded collections, see
7486
Behavior
7587
--------
7688

77-
No Collection ``chunkSize`` Specified
78-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89+
.. _chunksize-not-specified:
90+
91+
Default Behavior When chunkSize Is Not Specified
92+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7993

8094
If you do not specify ``chunkSize`` for a collection and no custom size
8195
has been set previously, the global default ``chunkSize`` is
8296
used for balancing.
8397

84-
Specifying ``chunkSize: 0``
85-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
98+
Specifying chunkSize: 0
99+
~~~~~~~~~~~~~~~~~~~~~~~
86100

87101
If you use :dbcommand:`configureCollectionBalancing` with
88102
``chunkSize: 0``, the per-collection ``chunkSize`` is reset and the
@@ -91,6 +105,14 @@ global default ``chunkSize`` is used for balancing.
91105
For more information on configuring default ``chunkSize``,
92106
see :ref:`tutorial-modifying-range-size`.
93107

108+
Default Behavior When enableAutoMerger Is Not Specified
109+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110+
111+
If you do not specify ``enableAutoMerger`` for a collection and no
112+
custom {+auto-merge-action+} behavior has been previously set, it
113+
defaults to ``true`` and will be taken into account by the
114+
{+auto-merge-upper+}.
115+
94116
Examples
95117
--------
96118

@@ -161,3 +183,16 @@ together:
161183
chunkSize: 512,
162184
defragmentCollection: true
163185
} )
186+
187+
Disable the {+auto-merge-upper+} on a Collection
188+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189+
190+
To explicitly disable the {+auto-merge-upper+} on a collection,
191+
set the ``enableAutoMerger`` option to ``false``:
192+
193+
.. code-block:: javascript
194+
195+
db.adminCommand( {
196+
configureCollectionBalancing: "test.students",
197+
enableAutoMerger: false
198+
} )

0 commit comments

Comments
 (0)