-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathsh.enableAutoMerger.txt
77 lines (50 loc) · 1.63 KB
/
sh.enableAutoMerger.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
=====================
sh.enableAutoMerger()
=====================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
Definition
----------
.. method:: sh.enableAutoMerger(namespace)
.. versionadded:: 7.0
.. include:: /includes/enableAutoMerger.rst
``sh.enableAutoMerger()`` is a :binary:`~bin.mongosh` helper method. It
is effectively the same as running the
:dbcommand:`configureCollectionBalancing` command with the
``enableAutoMerger`` field set to ``true``.
.. |dbcommand| replace:: :dbcommand:`configureCollectionBalancing` command
.. include:: /includes/fact-mongosh-shell-method-alt.rst
Compatibility
-------------
This method is available in deployments hosted in the following environments:
.. include:: /includes/fact-environments-atlas-only.rst
.. include:: /includes/fact-environments-atlas-support-no-free.rst
.. include:: /includes/fact-environments-onprem-only.rst
Syntax
------
.. code-block:: javascript
sh.enableAutoMerger( <namespace> )
Method Field
------------
.. include:: /includes/auto-merger-namespace-field.rst
Behavior
--------
.. include:: /includes/auto-merger-time-parameters.rst
Example
-------
The following example enables automatic chunk merges for
``"testDatabase.myCollection"``. Run the example from
:binary:`~bin.mongos`:
.. code-block:: javascript
sh.enableAutoMerger( "testDatabase.myCollection" )
Learn More
----------
- :ref:`automerger-concept`
- :method:`sh.disableAutoMerger()` method
- :method:`sh.startAutoMerger()` method
- :method:`sh.stopAutoMerger()` method
.. include:: /includes/auto-merger-learn-more.rst