@@ -34,6 +34,7 @@ The command has the following syntax:
34
34
configureCollectionBalancing: "<db>.<collection>",
35
35
chunkSize: <num>,
36
36
defragmentCollection: <bool>
37
+ enableAutoMerger: <bool>
37
38
}
38
39
)
39
40
@@ -44,22 +45,33 @@ Command Fields
44
45
45
46
.. list-table::
46
47
:header-rows: 1
47
- :widths: 20 20 80
48
+ :widths: 20 20 20 40
48
49
49
50
* - Field
50
51
- Type
52
+ - Necessity
51
53
- Description
52
54
* - ``configureCollectionBalancing``
53
55
- 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.
56
58
* - ``chunkSize``
57
59
- 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`.
60
64
* - ``defragmentCollection``
61
65
- 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``.
63
75
64
76
65
77
For more information, see :ref:`Data Partitioning with Chunks
@@ -74,15 +86,17 @@ To learn about defragmenting sharded collections, see
74
86
Behavior
75
87
--------
76
88
77
- No Collection ``chunkSize`` Specified
78
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
+ .. _chunksize-not-specified:
90
+
91
+ Default Behavior When chunkSize Is Not Specified
92
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79
93
80
94
If you do not specify ``chunkSize`` for a collection and no custom size
81
95
has been set previously, the global default ``chunkSize`` is
82
96
used for balancing.
83
97
84
- Specifying `` chunkSize: 0``
85
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
+ Specifying chunkSize: 0
99
+ ~~~~~~~~~~~~~~~~~~~~~~~
86
100
87
101
If you use :dbcommand:`configureCollectionBalancing` with
88
102
``chunkSize: 0``, the per-collection ``chunkSize`` is reset and the
@@ -91,6 +105,14 @@ global default ``chunkSize`` is used for balancing.
91
105
For more information on configuring default ``chunkSize``,
92
106
see :ref:`tutorial-modifying-range-size`.
93
107
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
+
94
116
Examples
95
117
--------
96
118
@@ -161,3 +183,16 @@ together:
161
183
chunkSize: 512,
162
184
defragmentCollection: true
163
185
} )
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