Skip to content

DOCSP-48515-Source-destination-balancing #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 26, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions source/reference/mongosync/mongosync-behavior.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ destination cluster.
Chunk Distribution
''''''''''''''''''

.. important::

Even if ``mongosync`` balances the source cluster, it does not

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this language might be a little confusing–mongosync itself doesn't balance the source cluster, it's really that the source cluster was balanced prior to mongosync. This might read better if use the language from the jira ticket like "preserve chunk distribution from the source to the destination", because I think what we're really saying is that even if the source is balanced before mongosync, mongosync doesn't guarantee the destination cluster will be balanced.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, agree with Nick

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distinction we want to draw is, even if the source cluster is itself already properly balanced prior to mongosync being called, this pre-existing balance does not help the destination cluster get balanced because mongosync does not preserve the sharding config

balance the destination cluster. To balance the destination
cluster, enable the destination cluster's balancer after your
migration finishes.

``mongosync`` does not preserve chunk distribution from the source to
the destination, even with multiple ``mongosync`` instances. It is not
possible to reproduce a particular pre-split of chunks from a source
Expand Down