From 93f6f469da3bf26becd0ea6a6037bb2d5dbee173 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Tue, 18 Mar 2025 17:13:47 -0400 Subject: [PATCH 1/8] DOCSP-48525-disaster-recovery-faq-entry --- source/faq.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/faq.txt b/source/faq.txt index 319b2699a..f9d1352e2 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -23,6 +23,8 @@ Can I change the load level while ``mongosync`` is syncing? Yes, you can adjust the cluster workload level during a migration by following the steps in :ref:`c2c-reconfigure-mid-migration`. +.. _c2c-faq-reads-writes-mongosync: + Can I perform reads or writes to my destination cluster while ``mongosync`` is syncing? --------------------------------------------------------------------------------------- @@ -232,4 +234,11 @@ 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 +efficiently across the destination cluster’s shards after migration. + +Can I use mongosync to set up a Disaster Recovery cluster? +---------------------------------------------------------- + +This is not possible to do with ``mongosync`` today, since +``mongosync`` must commit in order to safely accept traffic to the +destination cluster. For more information, see :ref:`c2c-faq-reads-writes-mongosync`. \ No newline at end of file From f1580157d51e6b9c6729d0264f2ae1c904358360 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Tue, 18 Mar 2025 17:32:53 -0400 Subject: [PATCH 2/8] wording --- source/faq.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/faq.txt b/source/faq.txt index f9d1352e2..46ae059b7 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -236,9 +236,9 @@ 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. -Can I use mongosync to set up a Disaster Recovery cluster? +Can I use ``mongosync`` to set up a Disaster Recovery cluster? ---------------------------------------------------------- -This is not possible to do with ``mongosync`` today, since -``mongosync`` must commit in order to safely accept traffic to the +No, you can't currently set up a Disaster Recovery cluster with ``mongosync``, +since ``mongosync`` must commit in order to safely accept traffic to the destination cluster. For more information, see :ref:`c2c-faq-reads-writes-mongosync`. \ No newline at end of file From 2edf50bd2c37c82f4bdfc26c97035c80f2e1f444 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Tue, 18 Mar 2025 17:38:12 -0400 Subject: [PATCH 3/8] build error --- source/faq.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/faq.txt b/source/faq.txt index 46ae059b7..be8a9c509 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -237,7 +237,7 @@ during initialization to determine how to distribute documents efficiently across the destination cluster’s shards after migration. Can I use ``mongosync`` to set up a Disaster Recovery cluster? ----------------------------------------------------------- +-------------------------------------------------------------- No, you can't currently set up a Disaster Recovery cluster with ``mongosync``, since ``mongosync`` must commit in order to safely accept traffic to the From 9718c068f22027bd8487c99e32c55785bbd73b09 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Wed, 19 Mar 2025 12:46:47 -0400 Subject: [PATCH 4/8] reviewer request --- source/about-mongosync.txt | 2 ++ source/faq.txt | 2 +- source/includes/fact-no-mongosync-disaster-recovery.rst | 4 ++++ source/index.txt | 2 ++ source/quickstart.txt | 2 ++ source/reference/mongosync/mongosync-behavior.txt | 2 ++ 6 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 source/includes/fact-no-mongosync-disaster-recovery.rst diff --git a/source/about-mongosync.txt b/source/about-mongosync.txt index 45ddaf15b..e18969faf 100644 --- a/source/about-mongosync.txt +++ b/source/about-mongosync.txt @@ -19,6 +19,8 @@ destination cluster and keeps the clusters in continuous sync until you In addition to continuous data synchronization, ``mongosync`` can also perform a one time data migration between clusters. +.. include:: /includes/fact-no-mongosync-disaster-recovery.rst + ``mongosync`` keeps track of its current actions through :ref:`states `. ``mongosync`` enters different states depending on the requests it receives. The current ``mongosync`` state determines which API diff --git a/source/faq.txt b/source/faq.txt index be8a9c509..b3764fa37 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -240,5 +240,5 @@ Can I use ``mongosync`` to set up a Disaster Recovery cluster? -------------------------------------------------------------- No, you can't currently set up a Disaster Recovery cluster with ``mongosync``, -since ``mongosync`` must commit in order to safely accept traffic to the +since ``mongosync`` **must commit** in order to safely accept traffic to the destination cluster. For more information, see :ref:`c2c-faq-reads-writes-mongosync`. \ No newline at end of file diff --git a/source/includes/fact-no-mongosync-disaster-recovery.rst b/source/includes/fact-no-mongosync-disaster-recovery.rst new file mode 100644 index 000000000..a6b69c287 --- /dev/null +++ b/source/includes/fact-no-mongosync-disaster-recovery.rst @@ -0,0 +1,4 @@ +Until you've called commit on mongosync and canWrite successfully +returns true, the destination cluster cannot be used to accept +application read or write traffic. +Do not use mongosync for maintaining Disaster Recovery clusters. \ No newline at end of file diff --git a/source/index.txt b/source/index.txt index a2d64d517..cb48633f9 100644 --- a/source/index.txt +++ b/source/index.txt @@ -13,6 +13,8 @@ enable {+c2c-product-name+} with the :ref:`mongosync ` utility. For an overview of the ``mongosync`` process, see :ref:`about-mongosync`. +.. include:: /includes/fact-no-mongosync-disaster-recovery.rst + To get started with ``mongosync``, refer to the :ref:`Quick Start Guide `. For more detailed information, refer to the :ref:`c2c-install` or :ref:`c2c-connecting` page that best fits your diff --git a/source/quickstart.txt b/source/quickstart.txt index 1e16646b3..4b35e0210 100644 --- a/source/quickstart.txt +++ b/source/quickstart.txt @@ -41,6 +41,8 @@ the rest of the {+c2c-product-name+} documentation. ``mongosync`` syncs writes on the source cluster for the duration of the migration until commit is called. +.. include:: /includes/fact-no-mongosync-disaster-recovery.rst + Follow the instructions below to set up {+c2c-product-name+}, connect your clusters, and synchronize your data. diff --git a/source/reference/mongosync/mongosync-behavior.txt b/source/reference/mongosync/mongosync-behavior.txt index 11374aba6..819fc4c4e 100644 --- a/source/reference/mongosync/mongosync-behavior.txt +++ b/source/reference/mongosync/mongosync-behavior.txt @@ -219,6 +219,8 @@ For any continuous synchronization use cases with ``mongosync``, ensure that ``mongosync`` commits before cutting over from the source to the destination. +.. include:: /includes/fact-no-mongosync-disaster-recovery.rst + If the source cluster shuts down before ``mongosync`` can commit, such as in a disaster scenario, the destination cluster might not have a consistent snapshot of the source data. To learn more, see :ref:`c2c-behavior-consistency`. From a3fc73068c8d75f733b57560af40530faee6b005 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Wed, 19 Mar 2025 13:18:07 -0400 Subject: [PATCH 5/8] add important --- source/about-mongosync.txt | 4 +++- source/index.txt | 4 +++- source/quickstart.txt | 4 +++- source/reference/mongosync/mongosync-behavior.txt | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/source/about-mongosync.txt b/source/about-mongosync.txt index e18969faf..64d67ad62 100644 --- a/source/about-mongosync.txt +++ b/source/about-mongosync.txt @@ -19,7 +19,9 @@ destination cluster and keeps the clusters in continuous sync until you In addition to continuous data synchronization, ``mongosync`` can also perform a one time data migration between clusters. -.. include:: /includes/fact-no-mongosync-disaster-recovery.rst +.. important:: + + .. include:: /includes/fact-no-mongosync-disaster-recovery.rst ``mongosync`` keeps track of its current actions through :ref:`states `. ``mongosync`` enters different states depending on diff --git a/source/index.txt b/source/index.txt index cb48633f9..44d71e2c2 100644 --- a/source/index.txt +++ b/source/index.txt @@ -13,7 +13,9 @@ enable {+c2c-product-name+} with the :ref:`mongosync ` utility. For an overview of the ``mongosync`` process, see :ref:`about-mongosync`. -.. include:: /includes/fact-no-mongosync-disaster-recovery.rst +.. important:: + + .. include:: /includes/fact-no-mongosync-disaster-recovery.rst To get started with ``mongosync``, refer to the :ref:`Quick Start Guide `. For more detailed information, refer to the diff --git a/source/quickstart.txt b/source/quickstart.txt index 4b35e0210..5a2271ca9 100644 --- a/source/quickstart.txt +++ b/source/quickstart.txt @@ -41,7 +41,9 @@ the rest of the {+c2c-product-name+} documentation. ``mongosync`` syncs writes on the source cluster for the duration of the migration until commit is called. -.. include:: /includes/fact-no-mongosync-disaster-recovery.rst +.. important:: + + .. include:: /includes/fact-no-mongosync-disaster-recovery.rst Follow the instructions below to set up {+c2c-product-name+}, connect your clusters, and synchronize your data. diff --git a/source/reference/mongosync/mongosync-behavior.txt b/source/reference/mongosync/mongosync-behavior.txt index 819fc4c4e..8011e29d6 100644 --- a/source/reference/mongosync/mongosync-behavior.txt +++ b/source/reference/mongosync/mongosync-behavior.txt @@ -219,7 +219,9 @@ For any continuous synchronization use cases with ``mongosync``, ensure that ``mongosync`` commits before cutting over from the source to the destination. -.. include:: /includes/fact-no-mongosync-disaster-recovery.rst +.. important:: + + .. include:: /includes/fact-no-mongosync-disaster-recovery.rst If the source cluster shuts down before ``mongosync`` can commit, such as in a disaster scenario, the destination cluster might not have a consistent From 08f0d4e213058c202d54c75d03a70e347035963f Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Wed, 19 Mar 2025 13:59:02 -0400 Subject: [PATCH 6/8] monospace --- source/includes/fact-no-mongosync-disaster-recovery.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/includes/fact-no-mongosync-disaster-recovery.rst b/source/includes/fact-no-mongosync-disaster-recovery.rst index a6b69c287..84a40c8c9 100644 --- a/source/includes/fact-no-mongosync-disaster-recovery.rst +++ b/source/includes/fact-no-mongosync-disaster-recovery.rst @@ -1,4 +1,4 @@ -Until you've called commit on mongosync and canWrite successfully -returns true, the destination cluster cannot be used to accept +Until you've called commit on ``mongosync`` and ``canWrite`` successfully +returns ``true``, the destination cluster cannot be used to accept application read or write traffic. -Do not use mongosync for maintaining Disaster Recovery clusters. \ No newline at end of file +Do not use ``mongosync`` for maintaining Disaster Recovery clusters. \ No newline at end of file From e45c6980910c54019c2785700c295f9ec1b52910 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Wed, 19 Mar 2025 16:48:30 -0400 Subject: [PATCH 7/8] reviewer updates --- source/faq.txt | 17 +++++++++-------- .../fact-no-mongosync-disaster-recovery.rst | 2 +- .../reference/mongosync/mongosync-behavior.txt | 4 ---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/source/faq.txt b/source/faq.txt index b3764fa37..fd3f049d3 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -54,6 +54,14 @@ To learn more about permissable reads and writes during synchronization, see Index builds on the destination cluster are treated as writes while ``mongosync`` is syncing. +Can I use ``mongosync`` to maintain a Disaster Recovery cluster? +---------------------------------------------------------------- + +No, you can't currently maintain a Disaster Recovery cluster with ``mongosync``, +since ``mongosync`` **must :ref:``** in order to +safely accept traffic to the destination cluster. +For more information, see :ref:`c2c-faq-reads-writes-mongosync`. + Why are the destination cluster indexes larger than the source cluster indexes? ------------------------------------------------------------------------------- @@ -234,11 +242,4 @@ 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. - -Can I use ``mongosync`` to set up a Disaster Recovery cluster? --------------------------------------------------------------- - -No, you can't currently set up a Disaster Recovery cluster with ``mongosync``, -since ``mongosync`` **must commit** in order to safely accept traffic to the -destination cluster. For more information, see :ref:`c2c-faq-reads-writes-mongosync`. \ No newline at end of file +efficiently across the destination cluster’s shards after migration. \ No newline at end of file diff --git a/source/includes/fact-no-mongosync-disaster-recovery.rst b/source/includes/fact-no-mongosync-disaster-recovery.rst index 84a40c8c9..a385d35fe 100644 --- a/source/includes/fact-no-mongosync-disaster-recovery.rst +++ b/source/includes/fact-no-mongosync-disaster-recovery.rst @@ -1,4 +1,4 @@ -Until you've called commit on ``mongosync`` and ``canWrite`` successfully +Until you've called :ref:`` on ``mongosync`` and ``canWrite`` successfully returns ``true``, the destination cluster cannot be used to accept application read or write traffic. Do not use ``mongosync`` for maintaining Disaster Recovery clusters. \ No newline at end of file diff --git a/source/reference/mongosync/mongosync-behavior.txt b/source/reference/mongosync/mongosync-behavior.txt index 8011e29d6..4aa381521 100644 --- a/source/reference/mongosync/mongosync-behavior.txt +++ b/source/reference/mongosync/mongosync-behavior.txt @@ -215,10 +215,6 @@ invalid index options on the destination. Considerations for Continuous Sync ---------------------------------- -For any continuous synchronization use cases with ``mongosync``, ensure that -``mongosync`` commits before cutting over from the source to the -destination. - .. important:: .. include:: /includes/fact-no-mongosync-disaster-recovery.rst From eb2f63f5138795114c8ccb18a5876b3891961923 Mon Sep 17 00:00:00 2001 From: Anika Malhotra Date: Wed, 19 Mar 2025 16:55:11 -0400 Subject: [PATCH 8/8] render issue --- source/faq.txt | 2 +- source/includes/fact-no-mongosync-disaster-recovery.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/faq.txt b/source/faq.txt index fd3f049d3..4d0df4923 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -58,7 +58,7 @@ Can I use ``mongosync`` to maintain a Disaster Recovery cluster? ---------------------------------------------------------------- No, you can't currently maintain a Disaster Recovery cluster with ``mongosync``, -since ``mongosync`` **must :ref:``** in order to +since ``mongosync`` must :ref:`c2c-api-commit` in order to safely accept traffic to the destination cluster. For more information, see :ref:`c2c-faq-reads-writes-mongosync`. diff --git a/source/includes/fact-no-mongosync-disaster-recovery.rst b/source/includes/fact-no-mongosync-disaster-recovery.rst index a385d35fe..5fa1f7b1a 100644 --- a/source/includes/fact-no-mongosync-disaster-recovery.rst +++ b/source/includes/fact-no-mongosync-disaster-recovery.rst @@ -1,4 +1,4 @@ -Until you've called :ref:`` on ``mongosync`` and ``canWrite`` successfully +Until you've called :ref:`c2c-api-commit` on ``mongosync`` and ``canWrite`` successfully returns ``true``, the destination cluster cannot be used to accept application read or write traffic. Do not use ``mongosync`` for maintaining Disaster Recovery clusters. \ No newline at end of file