From bd93b7c95d58b29d191c3d17294b45064b7d38b8 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:53:43 -0500 Subject: [PATCH] DOCSP-44120-clarify-mongosync-sharding-behavior (#487) * DOCSP-44120-mongosync-sharding-behavior * DOCSP-44120-mongosync-sharding-behavior * DOCSP-44120-mongosync-sharding-behavior * DOCSP-44120-FAQ * DOCSP-44120 tech edit * DOCSP-44120 tech edit (cherry picked from commit aba042ee2a25fd33715ad624db6dd6a70161b93a) --- source/faq.txt | 8 ++++++++ source/reference/mongosync/mongosync-behavior.txt | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/source/faq.txt b/source/faq.txt index 7d46c80b6..16c0eb3c4 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -187,3 +187,11 @@ Does ``mongosync`` Support TTL Indexes? {+c2c-product-name+} supports syncing :ref:`index-feature-ttl` from the source to the destination cluster. + +Can I customize chunk distributions when syncing into a sharded cluster? +------------------------------------------------------------------------ + +No, you can't configure ``mongosync`` to customize chunk distributions +on a destination sharded cluster. ``mongosync`` samples each collection +during initialization to determine how to distribute documents +efficiently across the destination cluster’s shards after migration. \ No newline at end of file diff --git a/source/reference/mongosync/mongosync-behavior.txt b/source/reference/mongosync/mongosync-behavior.txt index f8ee020bd..e33d56e48 100644 --- a/source/reference/mongosync/mongosync-behavior.txt +++ b/source/reference/mongosync/mongosync-behavior.txt @@ -111,6 +111,19 @@ for sharded collections on the destination cluster. For each sharded collection, ``mongosync`` creates twice as many chunks as there are shards in the destination cluster. +Chunk Distribution +'''''''''''''''''' + +``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 +cluster on the destination cluster. + +The only sharding configuration that ``mongosync`` preserves from the +source cluster to the destination cluster is the sharding key. Once the +migration finishes, you can enable the destination cluster's balancer which +distributes documents independently of the source cluster's distribution. + Primary Shards ''''''''''''''