Skip to content

Commit b7ebbb0

Browse files
committed
add info to enable/disable balancer steps
1 parent d9362cf commit b7ebbb0

File tree

4 files changed

+51
-9
lines changed

4 files changed

+51
-9
lines changed

source/includes/steps-3.6-upgrade-sharded-cluster.yaml

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,37 @@ title: Disable the Balancer.
22
level: 4
33
ref: 3.6-upgrade-disable-balancer
44
content: |
5-
Disable the balancer as described in
6-
:ref:`sharding-balancing-disable-temporarily`.
5+
6+
Connect a :program:`mongo` shell to a :program:`mongos` instance in
7+
the sharded cluster, and run :method:`sh.stopBalancer()` to
8+
disable the balancer:
9+
10+
.. cssclass:: copyable-code
11+
12+
.. code-block::
13+
14+
sh.stopBalancer()
15+
16+
.. note::
17+
18+
If a migration is in progress, the system will complete the
19+
in-progress migration before stopping the balancer. You can run
20+
:method:`sh.isBalancerRunning()` to check the balancer's current
21+
state.
22+
23+
To verify that the balancer is disabled, run
24+
:method:`sh.getBalancerState()`, which returns false if the balancer
25+
is disabled:
26+
27+
.. cssclass:: copyable-code
28+
29+
.. code-block::
30+
31+
sh.getBalancerState()
32+
33+
For more information on disabling the balancer, see
34+
:ref:`sharding-balancing-disable-temporarily`.
35+
736
---
837
title: "Upgrade the config servers."
938
level: 4
@@ -224,11 +253,22 @@ title: "Re-enable the balancer."
224253
level: 4
225254
ref: 3.6-upgrade-reenable-balancer
226255
content: |-
227-
Using a |newversion| :program:`mongo` shell, re-enable the balancer as
228-
described in :ref:`sharding-balancing-enable`.
229256
230-
The |oldversion| and earlier :program:`mongo` shell is not compatible with |newversion|
231-
clusters.
257+
Using a |newversion| :program:`mongo` shell, connect to a
258+
:program:`mongos` in the cluster and run
259+
:method:`sh.setBalancerState()` to re-enable the balancer:
260+
261+
.. cssclass:: copyable-code
262+
263+
.. code-block:: sh
264+
265+
sh.setBalancerState(true)
266+
267+
The |oldversion| and earlier :program:`mongo` shell is not
268+
compatible with |newversion| clusters.
269+
270+
For more information about re-enabling the balancer, see
271+
:ref:`sharding-balancing-enable`.
232272
233273
---
234274
title: "Enable backwards-incompatible |newversion| features."

source/release-notes/3.6-upgrade-replica-set.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Prerequisites
8080
following command on the primary. A majority of the data-bearing
8181
members must be available:
8282

83-
.. cssclass: copyable-code
83+
.. cssclass:: copyable-code
8484

8585
.. code-block:: javascript
8686

source/release-notes/3.6-upgrade-sharded-cluster.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Prerequisites
7777
To set or update ``featureCompatibilityVersion``, run the
7878
following command on the :program:`mongos`:
7979

80-
.. cssclass: copyable-code
80+
.. cssclass:: copyable-code
8181

8282
.. code-block:: javascript
8383

source/release-notes/3.6-upgrade-standalone.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Prerequisites
5050
The |oldversion| instance must have ``featureCompatibilityVersion`` set
5151
to ``3.4``. To check ``featureCompatibilityVersion``:
5252

53+
.. cssclass:: copyable-code
54+
5355
.. code-block:: javascript
5456

5557
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
@@ -60,7 +62,7 @@ The operation should return a result that includes
6062
To set or update ``featureCompatibilityVersion``, run the following
6163
command:
6264

63-
.. cssclass: copyable-code
65+
.. cssclass:: copyable-code
6466

6567
.. code-block:: javascript
6668

0 commit comments

Comments
 (0)