Skip to content

Commit e345e26

Browse files
authored
(DOCSP-45558)-Mention-altering-load-level-during-a-migration-in-mongosync’s-documentation-v1.9-backport (530) (#546)
* (DOCSP-45558) [C2C] Mention altering load level during a migration in mongosync’s documentation. (#530) * (DOCSP-45558) Add section to FAQ page. * (DOCSP-45558) Edits. * (DOCSP-45558) Edits. * (DOCSP-45558) Procedure. * (DOCSP-45558) Edit formatting. * (DOCSP-45558) Edits. * (DOCSP-45558) edits. * (DOCSP-45558) Edits. * (DOCSP-45558) Add pause step to FAQ and edit FAQ link. * (DOCSP-45558) Add update section to configuration page. * (DOCSP-45558) Standardize link to update documentation. * (DOCSP-45558) Edit. * (DOCSP-45558) Edits. * (DOCSP-45558) Normalize links. * (DOCSP-45558) Edit introduction to Optionsgst q * (DOCSP-45558) Edit Settings introduction. * (DOCSP-45558) Updates. * (DOCSP-45558) Make consistent intros to command line opts vs config file settings. * (DOCSP-45558) Edit wording. * (DOCSP-45558) Shorten sentence. * (DOCSP-45558) updates. * (DOCSP-45558) Edits. * (DOCSP-45558) Edit. * (DOCSP-45558) Edit important admonition. * (DOCSP-45558) @jwilson-mdb Review changes. * (DOCSP-45558) Add command line options to configuration intro. * (DOCSP-45558) Fix subtitle underline. * (DOCSP-45558) Fix subtitle underline. * (DOCSP-45558) @FGasper Review changes. (cherry picked from commit ccd72ea) * (DOCSP-45558) Fix typo.
1 parent e467165 commit e345e26

File tree

3 files changed

+121
-10
lines changed

3 files changed

+121
-10
lines changed

source/faq.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ This page provides answers to some frequently asked questions we have
1717
encountered. If you have additional questions please contact MongoDB
1818
Support.
1919

20-
.. _c2c-faq-read-write-during-sync:
20+
Can I change the load level while ``mongosync`` is syncing?
21+
-----------------------------------------------------------
22+
23+
Yes, you can adjust the cluster workload level during a migration by
24+
following the steps in :ref:`c2c-reconfigure-mid-migration`.
2125

2226
Can I perform reads or writes to my destination cluster while ``mongosync`` is syncing?
2327
---------------------------------------------------------------------------------------

source/reference/configuration.txt

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ Configuration
1313
:class: singlecol
1414

1515
You can configure :ref:`mongosync <c2c-mongosync>` instances at startup
16-
using a configuration file. The configuration file contains settings that are
16+
by using :ref:`command line options <c2c-cli-options>` or a configuration file.
17+
The configuration file specifies values for settings that are
1718
the equivalent of ``mongosync`` command line options.
1819

20+
During a migration, you can reconfigure certain ``mongosync`` settings by following the
21+
steps in :ref:`c2c-reconfigure-mid-migration`.
22+
23+
.. _c2c-configuration-file:
24+
1925
Configuration File
20-
==================
26+
------------------
2127

2228
You can write most ``mongosync``
2329
:ref:`command line options <c2c-cli-options>` to a YAML file. The
@@ -37,10 +43,14 @@ To use a configuration file, start ``mongosync`` with the
3743

3844
.. code-block:: console
3945

40-
$ mongosync --config mongosync.conf
46+
mongosync --config <configPath>
47+
48+
Settings
49+
~~~~~~~~
50+
51+
You can configure the following ``mongosync`` settings using a configuration file.
4152

42-
Options
43-
=======
53+
To configure ``mongosync`` from the command line, see :ref:`c2c-cli-options`.
4454

4555
.. note::
4656

@@ -144,3 +154,78 @@ Options
144154

145155
To set the ``verbosity`` setting from the command line, see the
146156
:option:`--verbosity` option.
157+
158+
.. _c2c-reconfigure-mid-migration:
159+
160+
Reconfigure ``mongosync`` During Synchronization
161+
------------------------------------------------
162+
163+
.. important::
164+
165+
Only the following settings can be adjusted during a migration.
166+
Other settings **must** remain unchanged between ``mongosync`` restarts.
167+
168+
While ``mongosync`` is syncing, you can reconfigure the :option:`--config`, :option:`--disableTelemetry`,
169+
:option:`--loadLevel`, :option:`--logPath`, :option:`--port`, and :option:`--verbosity` options
170+
by performing the following steps:
171+
172+
.. procedure::
173+
:style: normal
174+
175+
.. step:: (Optional) Pause the ``mongosync`` processes
176+
177+
Run :ref:`c2c-api-pause` on each running ``mongosync`` process.
178+
179+
You can resume the ``mongosync`` processes later from the paused
180+
state, as shown in the final step.
181+
182+
.. tip::
183+
184+
If you don't want to immediately resume data synchronization
185+
operations after reconfiguration, consider pausing the
186+
``mongosync`` processes. This is useful if you're coordinating
187+
operations from multiple ``mongosync`` processes.
188+
189+
.. step:: Stop the ``mongosync`` processes
190+
191+
Use your operating system to stop each running ``mongosync`` process.
192+
For the specific steps, see your operating system documentation.
193+
194+
.. step:: (Optional) Update your configuration file
195+
196+
If you used the :option:`--config` option to set the path to a configuration file
197+
when you first initialized ``mongosync``, update this configuration file with the new value for each setting.
198+
199+
.. step:: Initialize the ``mongosync`` processes
200+
201+
If you updated a configuration file in the last step, initialize
202+
the ``mongosync`` processes with the :option:`--config` option
203+
set to the path of the updated configuration file:
204+
205+
.. code-block:: console
206+
207+
mongosync --config <configPath>
208+
209+
If you did *not* use the :option:`--config` option when you first initialized ``mongosync``,
210+
initialize the ``mongosync`` processes with the command line options set to their updated values:
211+
212+
.. code-block:: console
213+
214+
mongosync \
215+
--cluster0 "<cluster0_connection_string>" \
216+
--cluster1 "<cluster1_connection_string>" \
217+
--loadLevel <newLevel>
218+
219+
For more information, see :ref:`Initialize mongosync <c2c-initialize>`.
220+
221+
.. step:: Start or Resume the ``mongosync`` processes
222+
223+
If you paused any ``mongosync`` processes earlier in the optional first step,
224+
run :ref:`c2c-api-resume` on the paused ``mongosync`` processes.
225+
226+
If you stopped any ``mongosync`` processes without using :ref:`c2c-api-pause`,
227+
run :ref:`c2c-api-start` on the stopped ``mongosync`` processes.
228+
For more detailed instructions, see :ref:`c2c-quickstart-synchronize`.
229+
230+
``mongosync`` resumes the sync roughly where it was before you stopped the earlier proceses.
231+
Any partitions that were in progress at the time of termination will restart from the beginning.

source/reference/mongosync.txt

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ For more information on how to format your connection strings, see
7171
Command Line Options
7272
--------------------
7373

74+
You can configure the following ``mongosync`` options using the command line.
75+
76+
To configure ``mongosync`` from a configuration file, see :ref:`c2c-configuration-file`.
77+
7478
.. |opt-term| replace:: option
7579

7680
Global Options
@@ -107,6 +111,9 @@ Global Options
107111

108112
Sets the path to the configuration file.
109113

114+
To set the configuration file path during a migration,
115+
see :ref:`c2c-reconfigure-mid-migration`.
116+
110117
For more information, see :ref:`c2c-mongosync-config`.
111118

112119
.. option:: --disableTelemetry
@@ -116,8 +123,11 @@ Global Options
116123
.. include:: /includes/opts/disableTelemetry
117124

118125
To set the ``--disableTelemetry`` option from a configuration file,
119-
see the :setting:`disableTelemetry` setting.
126+
see the :setting:`disableTelemetry` setting.
120127

128+
To disable telemetry data collection during a migration,
129+
see :ref:`c2c-reconfigure-mid-migration`.
130+
121131
For more information, see :ref:`User Data Collection
122132
<c2c-telemetry>`.
123133

@@ -138,9 +148,12 @@ Global Options
138148

139149
.. include:: /includes/opts/loadLevel.rst
140150

141-
To set the ``--loadLevel`` option from a configuration file, see the
142-
:setting:`loadLevel` setting.
151+
To set the ``--loadLevel`` option from a configuration file,
152+
see the :setting:`loadLevel` setting.
143153

154+
To change the load level during a migration,
155+
see :ref:`c2c-reconfigure-mid-migration`.
156+
144157
.. include:: /includes/opts/loadlevel-warning.rst
145158

146159
.. versionadded:: 1.4
@@ -152,6 +165,9 @@ Global Options
152165
To set the ``--logPath`` option from a configuration file,
153166
see the :setting:`logPath` setting.
154167

168+
To change the path to the log directory during a migration,
169+
see :ref:`c2c-reconfigure-mid-migration`.
170+
155171
.. note::
156172

157173
.. include:: /includes/fact-log-rotation-usr1-signal
@@ -163,6 +179,9 @@ Global Options
163179
To set the ``--port`` option from a configuration file,
164180
see the :setting:`port` setting.
165181

182+
To change the port during a migration,
183+
see :ref:`c2c-reconfigure-mid-migration`.
184+
166185
.. option:: --verbosity <level>
167186

168187
.. |verbosity-opt-type| replace:: option
@@ -172,7 +191,10 @@ Global Options
172191

173192
To set the ``--verbosity`` option from a configuration file,
174193
see the :setting:`verbosity` setting.
175-
194+
195+
To change the verbosity level during a migration,
196+
see :ref:`c2c-reconfigure-mid-migration`.
197+
176198
.. option:: --version, -v
177199

178200
Prints ``mongosync`` version information to stdout.

0 commit comments

Comments
 (0)