Skip to content

Commit 77cb80d

Browse files
authored
(DOCSP-45558)-Mention-altering-load-level-during-a-migration-in-mongosync’s-documentation-v1.8-backport (530) (#547)
* (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 18e4c06 commit 77cb80d

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

@@ -133,3 +143,78 @@ Options
133143

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

99103
Sets the path to the configuration file.
100104

105+
To set the configuration file path during a migration,
106+
see :ref:`c2c-reconfigure-mid-migration`.
107+
101108
For more information, see :ref:`c2c-mongosync-config`.
102109

103110
.. option:: --disableTelemetry
@@ -107,8 +114,11 @@ Global Options
107114
.. include:: /includes/opts/disableTelemetry
108115

109116
To set the ``--disableTelemetry`` option from a configuration file,
110-
see the :setting:`disableTelemetry` setting.
117+
see the :setting:`disableTelemetry` setting.
111118

119+
To disable telemetry data collection during a migration,
120+
see :ref:`c2c-reconfigure-mid-migration`.
121+
112122
For more information, see :ref:`User Data Collection
113123
<c2c-telemetry>`.
114124

@@ -129,9 +139,12 @@ Global Options
129139

130140
.. include:: /includes/opts/loadLevel.rst
131141

132-
To set the ``--loadLevel`` option from a configuration file, see the
133-
:setting:`loadLevel` setting.
142+
To set the ``--loadLevel`` option from a configuration file,
143+
see the :setting:`loadLevel` setting.
134144

145+
To change the load level during a migration,
146+
see :ref:`c2c-reconfigure-mid-migration`.
147+
135148
.. include:: /includes/opts/loadlevel-warning.rst
136149

137150
.. versionadded:: 1.4
@@ -143,6 +156,9 @@ Global Options
143156
To set the ``--logPath`` option from a configuration file,
144157
see the :setting:`logPath` setting.
145158

159+
To change the path to the log directory during a migration,
160+
see :ref:`c2c-reconfigure-mid-migration`.
161+
146162
.. note::
147163

148164
.. include:: /includes/fact-log-rotation-usr1-signal
@@ -154,6 +170,9 @@ Global Options
154170
To set the ``--port`` option from a configuration file,
155171
see the :setting:`port` setting.
156172

173+
To change the port during a migration,
174+
see :ref:`c2c-reconfigure-mid-migration`.
175+
157176
.. option:: --verbosity <level>
158177

159178
.. |verbosity-opt-type| replace:: option
@@ -163,7 +182,10 @@ Global Options
163182

164183
To set the ``--verbosity`` option from a configuration file,
165184
see the :setting:`verbosity` setting.
166-
185+
186+
To change the verbosity level during a migration,
187+
see :ref:`c2c-reconfigure-mid-migration`.
188+
167189
.. option:: --version, -v
168190

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

0 commit comments

Comments
 (0)