-
Notifications
You must be signed in to change notification settings - Fork 39
DOCSP-46644: Stop balancer on a per-collection basis #670
Changes from 10 commits
87a08e6
77494ff
5eb6612
8ac0409
f1d0a43
a2ab127
21d08a5
f205361
f8975aa
a2764e6
cb5f4e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,31 @@ | ||||||||||
.. important:: | ||||||||||
|
||||||||||
When the source or destination cluster is a sharded cluster, you must stop | ||||||||||
the balancer on both clusters and not run the :dbcommand:`moveChunk` or | ||||||||||
:dbcommand:`moveRange` commands for the duration of the migration. To stop | ||||||||||
the balancer, run the :dbcommand:`balancerStop` command and wait for the | ||||||||||
command to complete. | ||||||||||
You must always disable the balancer on a sharded destination | ||||||||||
cluster by using :dbcommand:`balancerStop`. | ||||||||||
After stopping the balancer, wait **fifteen minutes** before | ||||||||||
starting ``mongosync``. This gives the cluster time to | ||||||||||
finish any in-progress chunk migrations. | ||||||||||
|
||||||||||
If the source or destination cluster is a sharded cluster | ||||||||||
and you are not running ``mongosync`` with :ref:`namespace | ||||||||||
filtering <c2c-filtered-sync>`, | ||||||||||
you must disable the source cluster's balancer | ||||||||||
by running the :dbcommand:`balancerStop` command and waiting 15 minutes | ||||||||||
for the command to complete. | ||||||||||
|
||||||||||
If the source or destination cluster is a sharded cluster and you | ||||||||||
are running ``mongosync`` with namespace filtering, you can | ||||||||||
globally enable the source cluster's | ||||||||||
balancer but you must disable it for | ||||||||||
all collections within the namespace filter. | ||||||||||
See :ref:`disabling-balancer-filtered`. You can also fully disable | ||||||||||
the source cluster's balancer. | ||||||||||
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perfect! thanks for adding this. |
||||||||||
|
||||||||||
During migration, do not run the :dbcommand:`moveChunk` or | ||||||||||
:dbcommand:`moveRange` commands. If you have enabled the source cluster's | ||||||||||
balancer, but disabled it for collections within the namespace | ||||||||||
filter, do not run :dbcommand:`shardCollection` on collections | ||||||||||
within the namespace filter. If you run :dbcommand:`shardCollection` on | ||||||||||
collections within the namespace filter during the migration, ``mongosync`` | ||||||||||
Comment on lines
+27
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If possible to make these two sentences into one I think it might be cleaner, but up to your judgement–if you like to be explicit "do not run X command" that's ok too. |
||||||||||
returns an error and stops, which requires you to start the migration | ||||||||||
from scratch. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,16 +124,31 @@ Sharded Clusters | |
To check for index inconsistencies, see :ref:`Find Inconsistent | ||
Indexes Across Shards <manage-indexes-find-inconsistent-indexes>`. | ||
|
||
- You must stop the balancer on sharded source and destination clusters | ||
for the entire lifetime of a migration. To stop the balancer, run the | ||
:dbcommand:`balancerStop` command and wait for the command to | ||
complete. | ||
|
||
.. note:: | ||
|
||
After stopping the balancer, wait fifteen minutes before | ||
starting ``mongosync``. This gives the cluster time to | ||
finish any in progress chunk migrations. | ||
- If the source or destination cluster is a sharded cluster | ||
and you are not running ``mongosync`` with :ref:`namespace | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as other comment: I'd suggest "you are running mongosync without..." |
||
filtering <c2c-filtered-sync>`, | ||
you must disable the source cluster's balancer | ||
by running the :dbcommand:`balancerStop` command and waiting 15 minutes | ||
for the command to complete. | ||
|
||
If the source or destination cluster is a sharded cluster and you | ||
are running ``mongosync`` with namespace filtering, you can | ||
globally enable the source cluster's | ||
balancer but you must disable it for | ||
all collections within the namespace filter. | ||
See :ref:`disabling-balancer-filtered`. You can also fully disable | ||
the source cluster's balancer. | ||
|
||
You must always disable the balancer on a sharded destination | ||
cluster by using :dbcommand:`balancerStop`. | ||
|
||
- If you have enabled the source cluster's | ||
balancer, but disabled it for collections within the namespace | ||
filter, do not run :dbcommand:`shardCollection` on collections | ||
within the namespace filter. If you run :dbcommand:`shardCollection` on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as other comment on Behavior page–if possible to combine into one sentence to reduce repetition that would be great, but up to your discretion. |
||
collections within the namespace filter during the migration, ``mongosync`` | ||
returns an error and stops, which requires you to start the migration | ||
from scratch. | ||
|
||
- You must not run the :dbcommand:`moveChunk` and | ||
:dbcommand:`moveRange` commands on the source or destination clusters. | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -102,6 +102,49 @@ preserve the source cluster's sharding configuration. | |||||
|
||||||
.. include:: /includes/fact-mongosync-balancer.rst | ||||||
|
||||||
.. _disabling-balancer-filtered: | ||||||
|
||||||
Disabling Balancer for Collections in Filtered Sync | ||||||
''''''''''''''''''''''''''''''''''''''''''''''''''' | ||||||
|
||||||
If you are using a :ref:`namespace filter <c2c-filtered-sync>` | ||||||
and want to enable your source cluster's balancer for | ||||||
collections outside the namespace filter, | ||||||
use the following instructions before | ||||||
|
use the following instructions before | |
follow these instructions before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.