Skip to content

Commit 14ec011

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCS-15397 autosplit-update (#1842)
* DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update * DOCS-15397-autosplit-update Co-authored-by: jason-price-mongodb <[email protected]>
1 parent b0eda20 commit 14ec011

20 files changed

+132
-72
lines changed

source/core/sharding-data-partitioning.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ Limitations
128128
Changing the chunk size affects when chunks split but there are some
129129
limitations to its effects.
130130

131-
- Automatic splitting only occurs during inserts or updates. If you
132-
lower the chunk size, it may take time for all chunks to split to the
133-
new size.
131+
- .. include:: /includes/autosplit-no-operation.rst
134132

135-
- Splits cannot be "undone". If you increase the chunk size, existing
136-
chunks must grow through inserts or updates until they reach the new
137-
size.
133+
.. include:: /includes/autosplit-commands.rst
134+
135+
- In MongoDB versions earlier than 6.1, automatic splitting only occurs
136+
during inserts or updates. If you lower the chunk size, it may take
137+
time for all chunks to split to the new size.
138138

139139
.. _sharding-chunk-splits:
140140
.. _sharding-chunk-split:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Starting in MongoDB 6.1, the following auto-splitting commands do not
2+
perform an operation:
3+
4+
- :method:`sh.enableAutoSplit()`
5+
- :method:`sh.disableAutoSplit()`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Starting in MongoDB 6.1, automatic :ref:`chunk splitting
2+
<sharding-chunk-splits>` is not performed. This is because of balancing
3+
policy improvements. Auto-splitting commands still exist, but do not
4+
perform an operation. For details, see
5+
:ref:`release-notes-6.1-balancing-policy-changes`.

source/includes/extracts-4.2-changes.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,10 @@ content: |
532532
---
533533
ref: 4.2-changes-balancer-autosplit
534534
content: |
535-
Starting in MongoDB 4.2:
535+
536+
.. include:: /includes/autosplit-no-operation.rst
537+
538+
In MongoDB versions earlier than 6.1:
536539
537540
- The :dbcommand:`balancerStart` command and the
538541
``mongo`` shell helper methods
@@ -558,13 +561,19 @@ content: |
558561
---
559562
ref: 4.2-changes-start-balancer-autosplit
560563
content: |
561-
Starting in MongoDB 4.2, :method:`sh.startBalancer()` also enables
562-
auto-splitting for the sharded cluster.
564+
565+
.. include:: /includes/autosplit-no-operation.rst
566+
567+
In MongoDB versions earlier than 6.1, :method:`sh.startBalancer()`
568+
also enables auto-splitting for the sharded cluster.
563569
---
564570
ref: 4.2-changes-stop-balancer-autosplit
565571
content: |
566-
Starting in MongoDB 4.2, :method:`sh.stopBalancer()` also disables
567-
auto-splitting for the sharded cluster.
572+
573+
.. include:: /includes/autosplit-no-operation.rst
574+
575+
In MongoDB versions earlier than 6.1, :method:`sh.stopBalancer()`
576+
also disables auto-splitting for the sharded cluster.
568577
---
569578
ref: 4.2-changes-global-lock-reporting
570579
content: |

source/reference/command/balancerStart.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ Definition
1818
Starts the balancer thread. The command does not wait for a
1919
balancing round to start.
2020

21-
Starting in MongoDB 4.2, the command enables auto-splitting for the
22-
sharded cluster. To disable auto-splitting when the balancer is
23-
enabled, you can use :method:`sh.disableAutoSplit()`.
24-
21+
.. include:: /includes/autosplit-no-operation.rst
22+
23+
In MongoDB versions earlier than 6.1, the command enables
24+
auto-splitting for the sharded cluster. To disable auto-splitting
25+
when the balancer is enabled, you can use
26+
:method:`sh.disableAutoSplit()`.
27+
2528
Syntax
2629
------
2730

source/reference/command/balancerStop.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ Definition
1818
Disables the balancer in a sharded cluster. If a balancing round is
1919
in progress, the operation waits for balancing to complete.
2020

21-
Starting in MongoDB 4.2, the command disables auto-splitting for the
22-
sharded cluster. To enable auto-splitting when the balancer is
23-
disabled, you can use :method:`sh.enableAutoSplit()`.
24-
2521
You can only issue the :dbcommand:`balancerStop` against the
2622
``admin`` database on a :binary:`~bin.mongos` instance.
2723

24+
.. include:: /includes/autosplit-no-operation.rst
25+
26+
In MongoDB versions earlier than 6.1, the command disables
27+
auto-splitting for the sharded cluster. To enable auto-splitting when
28+
the balancer is disabled, you can use :method:`sh.enableAutoSplit()`.
29+
2830
Syntax
2931
------
3032

source/reference/config-database.txt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -383,32 +383,28 @@ to support sharding:
383383
balancer status, see
384384
:doc:`/tutorial/manage-sharded-cluster-balancer`.
385385

386-
Starting in MongoDB 4.2:
387-
388-
- :dbcommand:`balancerStart` also enables auto-splitting for the sharded cluster.
389-
390-
- :dbcommand:`balancerStop` also disables auto-splitting for the sharded cluster.
391-
392-
- Autosplit. To enable or disable the autosplit flag, use the
393-
corresponding :method:`sh.enableAutoSplit()` method or
394-
:method:`sh.disableAutoSplit()` method.
386+
- Autosplit:
387+
388+
.. include:: /includes/autosplit-no-operation.rst
395389

396-
Starting in MongoDB 4.2:
390+
In MongoDB versions earlier than 6.1:
397391

398392
- :dbcommand:`balancerStart` also enables auto-splitting for the
399393
sharded cluster.
400394

401395
- :dbcommand:`balancerStop` also disables auto-splitting for the
402396
sharded cluster.
397+
398+
- To enable or disable the autosplit flag, use the corresponding
399+
:method:`sh.enableAutoSplit()` method or
400+
:method:`sh.disableAutoSplit()` method.
403401

404-
The following are some example documents in the ``settings``
405-
collection:
402+
Example documents in the ``settings`` collection:
406403

407404
.. code-block:: javascript
408405

409406
{ "_id" : "chunksize", "value" : 64 }
410407
{ "_id" : "balancer", "mode" : "full", "stopped" : false }
411-
{ "_id" : "autosplit", "enabled" : true }
412408

413409
.. data:: config.shards
414410

source/reference/method.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,10 +975,14 @@ Sharding
975975

976976
- Disables auto-splitting for the sharded cluster.
977977

978+
.. include:: /includes/autosplit-no-operation.rst
979+
978980
* - :method:`sh.enableAutoSplit()`
979981

980982
- Enables auto-splitting for the sharded cluster.
981983

984+
.. include:: /includes/autosplit-no-operation.rst
985+
982986
* - :method:`sh.enableSharding()`
983987

984988
- Creates a database.

source/reference/method/js-sharding.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ Sharding Methods
6868

6969
- Disables auto-splitting for the sharded cluster.
7070

71+
.. include:: /includes/autosplit-no-operation.rst
72+
7173
* - :method:`sh.enableAutoSplit()`
7274

7375
- Enables auto-splitting for the sharded cluster.
7476

77+
.. include:: /includes/autosplit-no-operation.rst
78+
7579
* - :method:`sh.enableSharding()`
7680

7781
- Creates a database.

source/reference/method/sh.disableAutoSplit.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ sh.disableAutoSplit
1010
:depth: 1
1111
:class: singlecol
1212

13+
.. note::
14+
15+
.. include:: /includes/autosplit-no-operation.rst
16+
1317
Description
1418
-----------
1519

@@ -20,9 +24,6 @@ Description
2024
MongoDB automatically splits chunks based on the shard key values
2125
the chunk represents to keep the chunks from growing too large.
2226

23-
Auto-splitting is enabled by default. For more
24-
information on chunk splits, see :ref:`sharding-chunk-splits`.
25-
2627
You can only run :method:`sh.disableAutoSplit()` from a
2728
:binary:`~bin.mongosh` session that is connected to a
2829
:binary:`~bin.mongos` instance. :method:`sh.disableAutoSplit()`
@@ -34,5 +35,6 @@ Description
3435

3536
.. seealso::
3637

38+
- :ref:`sharding-chunk-splits`
3739
- :doc:`/tutorial/manage-sharded-cluster-balancer`
3840
- :ref:`sharding-balancing`

source/reference/method/sh.enableAutoSplit.txt

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,31 @@ sh.enableAutoSplit
1010
:depth: 1
1111
:class: singlecol
1212

13+
.. note::
14+
15+
.. include:: /includes/autosplit-no-operation.rst
16+
1317
Description
1418
-----------
1519

1620
.. method:: sh.enableAutoSplit()
1721

18-
Enables auto-splitting for the sharded cluster. Auto-splitting is
19-
enabled by default.
20-
21-
:method:`sh.enableAutoSplit()` enables the autosplit flag in the
22-
:data:`config.settings` collection.
23-
22+
Enables the autosplit flag in the :data:`config.settings`
23+
collection. When auto-splitting is enabled for a sharded cluster,
24+
MongoDB automatically splits chunks based on the shard key values
25+
the chunk represents to keep the chunks from growing too large.
26+
2427
You can only run :method:`sh.enableAutoSplit()` from a
2528
:binary:`~bin.mongosh` session that is connected to a
26-
:binary:`~bin.mongos` instance. :method:`sh.enableAutoSplit()` errors
27-
if run on a :binary:`~bin.mongod` instance.
29+
:binary:`~bin.mongos` instance. :method:`sh.enableAutoSplit()`
30+
errors if run on a :binary:`~bin.mongod` instance.
2831

2932
.. note::
30-
33+
3134
.. include:: /includes/extracts/4.2-changes-start-balancer-autosplit.rst
32-
33-
For more information on chunk splits, see
34-
:ref:`sharding-chunk-splits`. For more information about how MongoDB
35-
balances chunks among shards, see:
36-
:doc:`/tutorial/manage-sharded-cluster-balancer` and
37-
:ref:`sharding-balancing`.
35+
36+
.. seealso::
37+
38+
- :ref:`sharding-chunk-splits`
39+
- :doc:`/tutorial/manage-sharded-cluster-balancer`
40+
- :ref:`sharding-balancing`

source/reference/method/sh.setBalancerState.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ Description
1515

1616
.. method:: sh.setBalancerState(state)
1717

18-
Enables or disables the :term:`balancer`. Starting in MongoDB 4.2,
19-
the method also enables auto-splitting if enabling the balancer and
20-
disables auto-splitting if disabling the balancer.
21-
18+
Enables or disables the :term:`balancer`.
19+
20+
.. include:: /includes/autosplit-no-operation.rst
21+
22+
In MongoDB versions earlier than 6.1, :method:`sh.setBalancerState()`
23+
also enables auto-splitting if enabling the balancer and disables
24+
auto-splitting if disabling the balancer.
25+
2226
Use :method:`sh.getBalancerState()` to determine if the balancer is
2327
currently enabled or disabled and :method:`sh.isBalancerRunning()`
2428
to check its current state.

source/reference/method/sh.startBalancer.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ Definition
1515

1616
.. method:: sh.startBalancer(timeout, interval)
1717

18-
.. versionchanged:: 4.2
18+
.. versionchanged:: 6.1
1919

20-
Starts the balancer in a sharded cluster. Starting in MongoDB 4.2,
21-
:method:`sh.startBalancer()` also enables auto-splitting for the
22-
sharded cluster.
20+
Starts the balancer in a sharded cluster.
2321

24-
The method can take the following options:
22+
.. include:: /includes/autosplit-no-operation.rst
23+
24+
In MongoDB versions earlier than 6.1, :method:`sh.startBalancer()`
25+
also enables auto-splitting for the sharded cluster.
2526

27+
The method can take the following options:
2628

2729
.. list-table::
2830
:header-rows: 1

source/reference/method/sh.stopBalancer.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ Definition
1515

1616
.. method:: sh.stopBalancer(timeout, interval)
1717

18-
.. versionchanged:: 4.2
18+
.. versionchanged:: 6.1
1919

20-
Disables the balancer in a sharded cluster. Starting in MongoDB 4.2,
21-
:method:`sh.stopBalancer()` also disables auto-splitting for the
22-
sharded cluster.
20+
Disables the balancer in a sharded cluster.
2321

24-
The method can take the following options:
22+
.. include:: /includes/autosplit-no-operation.rst
23+
24+
In MongoDB versions earlier than 6.1, :method:`sh.stopBalancer()`
25+
also disables auto-splitting for the sharded cluster.
2526

27+
The method can take the following options:
2628

2729
.. list-table::
2830
:header-rows: 1

source/reference/sharding.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,14 @@ Sharding Methods in ``mongosh``
6969

7070
- Disables auto-splitting for the sharded cluster.
7171

72+
.. include:: /includes/autosplit-no-operation.rst
73+
7274
* - :method:`sh.enableAutoSplit()`
7375

7476
- Enables auto-splitting for the sharded cluster.
7577

78+
.. include:: /includes/autosplit-no-operation.rst
79+
7680
* - :method:`sh.enableSharding()`
7781

7882
- Creates a database.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ Upgrade Procedure
427427
If you do not wish to enable auto-splitting while the balancer is
428428
enabled, you must also run :method:`sh.disableAutoSplit()`.
429429

430+
.. include:: /includes/autosplit-no-operation.rst
431+
430432
For more information about re-enabling the balancer, see
431433
:ref:`sharding-balancing-enable`.
432434

source/release-notes/6.1-compatibility.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ series <manual-timeseries-collection>` bucket collection namespace
3434

3535
If you are upgrading to MongoDB 6.1 from a prior version, you must drop
3636
all views which are created on ``system.buckets`` collections.
37+
38+
No Automatic Chunk Splitting
39+
----------------------------
40+
41+
.. include:: /includes/autosplit-no-operation.rst
42+
43+
.. include:: /includes/autosplit-commands.rst

source/release-notes/6.1.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ For an example that uses the ``*UCP`` option, see
5151
General Changes
5252
---------------
5353

54+
.. _release-notes-6.1-balancing-policy-changes:
55+
5456
Balancing Policy Changes
5557
~~~~~~~~~~~~~~~~~~~~~~~~
5658

source/tutorial/manage-sharded-cluster-balancer.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
3-
41
===============================
52
Manage Sharded Cluster Balancer
63
===============================
@@ -13,16 +10,16 @@ Manage Sharded Cluster Balancer
1310
:depth: 1
1411
:class: singlecol
1512

16-
.. versionchanged:: 3.4
17-
18-
The balancer process has moved from the :binary:`~bin.mongos` instances
19-
to the primary member of the config server replica set.
13+
.. versionchanged:: 6.1
2014

2115
This page describes common administrative procedures related
2216
to balancing. For an introduction to balancing, see
2317
:ref:`sharding-balancing`. For lower level information on balancing, see
2418
:ref:`sharding-balancing-internals`.
2519

20+
The balancer process has moved from the :binary:`~bin.mongos` instances
21+
to the primary member of the config server replica set.
22+
2623
Check the Balancer State
2724
------------------------
2825

@@ -73,6 +70,8 @@ details, see :ref:`sharding-chunk-size`.
7370
Changing the default chunk size affects chunks that are processes during
7471
migrations and auto-splits but does not retroactively affect all chunks.
7572

73+
.. include:: /includes/autosplit-no-operation.rst
74+
7675
To configure default chunk size, see
7776
:doc:`modify-chunk-size-in-sharded-cluster`.
7877

0 commit comments

Comments
 (0)