-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathsh.isBalancerRunning.txt
110 lines (76 loc) · 2.51 KB
/
sh.isBalancerRunning.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
======================
sh.isBalancerRunning()
======================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
Definition
----------
.. method:: sh.isBalancerRunning()
Returns a document describing the status of the balancer.
.. |dbcommand| replace:: :dbcommand:`balancerStatus` 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
Output Document
---------------
The following is an example of a document returned by the command:
.. code-block:: json
:copyable: false
{
mode: 'full',
inBalancerRound: false,
numBalancerRounds: Long("1143"),
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1639753724, i: 3 }),
signature: {
hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
keyId: Long("0")
}
},
operationTime: Timestamp({ t: 1639753724, i: 3 })
}
.. list-table::
:header-rows: 1
:widths: 20 80
* - Field
- Description
* - ``mode``
- String that specifies whether the balancer thread is running
or stopped. Possible values are:
- "full"
Balancer thread is running but not necessarily in a
balancing round.
- "off"
Balancer thread is stopped. Chunk balancing cannot occur in
this mode.
* - ``inBalancerRound``
- Boolean that specifies if the balancer is currently in a
balancing round.
* - ``numBalancerRounds``
- Number of balancer rounds which have occurred since the
config servers were started. This value is reset to 0 when
the config servers are restarted.
* - ``ok``
- See :ref:`Command Response <command-response>`.
* - ``$clusterTime``
- See :ref:`Command Response <command-response>`.
* - ``operationTime``
- See :ref:`Command Response <command-response>`.
.. seealso::
- :method:`sh.enableBalancing()`
- :method:`sh.disableBalancing()`
- :method:`sh.getBalancerState()`
- :method:`sh.setBalancerState()`
- :method:`sh.startBalancer()`
- :method:`sh.stopBalancer()`
- :method:`sh.waitForBalancer()`
- :method:`sh.waitForBalancerOff()`