Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit 6072eaf

Browse files
authored
DOCSP-47288: Rename some enableUserWriteBlocking internal-only options and disallow live upgrade to 1.12 (#611)
* write blocking params * release notes * live upgrade fix * simplifying * sourceanddestination * mod * style
1 parent 74d175d commit 6072eaf

13 files changed

+84
-41
lines changed

source/about-mongosync.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ call the :ref:`commit <c2c-api-commit>` endpoint.
129129
You must block writes to the source cluster before you begin the
130130
the commit process.
131131

132-
If you previously set ``enableUserWriteBlocking`` to ``true`` when
133-
you used the :ref:`start <c2c-api-start>` endpoint, ``mongosync``
132+
If you previously set ``enableUserWriteBlocking`` to ``"sourceAndDestination"``
133+
when you used the :ref:`start <c2c-api-start>` endpoint, ``mongosync``
134134
automatically blocks writes on the source cluster when you use the
135135
``commit`` endpoint.
136136

137-
If you did not set ``enableUserWriteBlocking`` to ``true``, run
138-
:dbcommand:`setUserWriteBlockMode` on the source cluster to
137+
If you did not set ``enableUserWriteBlocking`` to ``"sourceAndDestination"``,
138+
run :dbcommand:`setUserWriteBlockMode` on the source cluster to
139139
block writes.
140140

141141
The ``commit`` endpoint starts the :ref:`COMMITTING <c2c-state-committing>`

source/includes/fact-older-version-limitations.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
- :ref:`/reverse <c2c-api-reverse>` endpoint is not supported. You can't
2929
enable the ``reversible`` option in the :ref:`/start <c2c-api-start>` request.
3030

31-
- You can't set the ``enableUserWriteBlocking`` option to ``true``
32-
in the ``/start`` request, so dual write-blocking is not supported.
31+
- You can't set the ``enableUserWriteBlocking`` option to
32+
``"sourceAndDestination"`` in the ``/start`` request, so dual write-blocking
33+
is not supported.
3334
Destination-only write-blocking is supported. Ensure that no writes are
3435
made to the source cluster after you call the ``/commit`` endpoint.
3536

source/includes/fact-write-blocking-enable.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ If you enable dual write-blocking, ``mongosync`` blocks writes:
1515
- On the source cluster after you call ``/commit``
1616

1717
To enable dual write-blocking, use :ref:`/start <c2c-api-start>`
18-
to set ``enableUserWriteBlocking`` to ``true``.
18+
to set ``enableUserWriteBlocking`` to ``"sourceAndDestination"``.
1919

2020
You can use
2121
:ref:`/start <c2c-api-start>`
22-
to set ``enableUserWriteBlocking`` to ``false``.
22+
to set ``enableUserWriteBlocking`` to ``"none"``.
2323

2424
You cannot enable dual write-blocking or disable
2525
write-blocking after the sync starts.

source/includes/live-upgrade.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Starting in ``mongosync`` 1.7.0, you can upgrade ``mongosync`` without
2-
restarting data synchronization operations from the beginning. You can
3-
only live upgrade to ``mongosync`` 1.7.3 or later from ``mongosync``
4-
1.7.2 or later.
2+
restarting data synchronization operations from the beginning.
53

64
.. important::
75

8-
``mongosync`` does not support live upgrades to version 1.11.
6+
``mongosync`` does not support live upgrades to version 1.12.

source/reference/api/reverse.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ To use the ``reverse`` endpoint:
4545
call to the :ref:`/start <c2c-api-start>` API endpoint must set:
4646

4747
- ``reversible`` to ``true``
48-
- ``enableUserWriteBlocking`` to ``true``.
48+
- ``enableUserWriteBlocking`` to ``"sourceAndDestination"``.
4949

5050
.. note::
5151

source/reference/api/start.txt

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,28 +115,33 @@ Request Body Parameters
115115
.. versionadded:: 1.3.0
116116

117117
* - ``enableUserWriteBlocking``
118-
- boolean or string
118+
- string or boolean
119119
- Optional
120-
- If set to ``true``, blocks writes on the destination
121-
cluster while the migration is in progress, and unblocks writes right
122-
before the :ref:`/progress <c2c-api-progress>` endpoint reports
123-
that ``canWrite`` is ``true``. Blocks writes on the source
124-
cluster after ``mongosync`` calls the :ref:`/commit <c2c-api-commit>`
125-
endpoint.
120+
- :gold:`IMPORTANT:` If you are migrating from a pre-6.0 source cluster,
121+
you cannot set this parameter.
122+
123+
Supported options:
124+
125+
- ``"sourceAndDestination"``: blocks writes on the destination
126+
cluster while the migration is in progress, and unblocks writes right
127+
before the :ref:`/progress <c2c-api-progress>` endpoint reports
128+
that ``canWrite`` is ``true``. Blocks writes on the source
129+
cluster after ``mongosync`` calls the :ref:`/commit <c2c-api-commit>`
130+
endpoint.
126131

127-
If set to ``false``, no write blocking occurs.
132+
You can also use ``true`` for backward compatibility.
128133

129-
If set to ``"destinationOnly"``, blocks writes on the destination
130-
cluster while migration is in progress, and unblocks writes right
131-
before ``canWrite`` is ``true``.
134+
- ``"none"``: no write blocking occurs. You can also use ``false``
135+
for backward compatibility.
132136

133-
:gold:`IMPORTANT:` If you are migrating from a pre-6.0 source cluster,
134-
you cannot set ``enableUserWriteBlocking`` to ``true``.
137+
- ``"destinationOnly"``: blocks writes on the destination
138+
cluster while migration is in progress, and unblocks writes right
139+
before ``canWrite`` is ``true``.
135140

136141
To reverse sync, the ``enableUserWriteBlocking`` field must be set
137-
to ``true``. To allow the source cluster to accept writes again,
138-
for example after running migration tests, run the following
139-
command:
142+
to ``"sourceAndDestination"``. To allow the source cluster
143+
to accept writes again, for example after running migration tests,
144+
run the following command:
140145

141146
.. code-block:: shell
142147

source/reference/cutover-process.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ Steps
8484
destination and unblocks them right before ``canWrite`` is
8585
set to ``true``.
8686
- If you start ``mongosync`` with ``enableUserWriteBlocking``
87-
set to ``true``, ``mongosync`` blocks all write operations
87+
set to ``"sourceAndDestination"``, ``mongosync`` blocks all write operations
8888
on the destination cluster and unblocks them right before ``canWrite``
8989
is set to ``true``. ``mongosync`` blocks writes on the source after you call
9090
``/commit``.
9191
- If you start ``mongosync`` with ``enableUserWriteBlocking`` set
92-
to ``false``, ensure that you disable writes.
92+
to ``"none"``, ensure that you disable writes.
9393
For example, run the :dbcommand:`setUserWriteBlockMode` command on the
9494
source cluster:
9595

source/reference/limitations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ General Limitations
4141
- Other clients must not write to the destination cluster while
4242
``mongosync`` is running.
4343
- If you want to start the :ref:`commit <c2c-api-commit>`
44-
process and you did not set ``enableUserWriteBlocking`` to ``true``
44+
process and you did not set ``enableUserWriteBlocking`` to ``"sourceAndDestination"``
4545
when you used the :ref:`c2c-api-start` endpoint, you
4646
must :ref:`prevent writes <c2c-api-start>` to the source cluster
4747
before you start the commit process.

source/reference/versioning.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,7 @@ Live Upgrade
6565

6666
.. versionadded:: 1.7.0
6767

68-
Starting in ``mongosync`` 1.7.0, you can upgrade ``mongosync`` without
69-
restarting data synchronization operations from the beginning.
70-
71-
.. important::
72-
73-
``mongosync`` does not support live upgrades to version 1.11.
68+
.. include:: /includes/live-upgrade.rst
7469

7570
After the live upgrade, ``mongosync`` continues operations that were in
7671
progress before the upgrade.

source/release-notes.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ release notes.
1414
Current Stable Release
1515
~~~~~~~~~~~~~~~~~~~~~~
1616

17-
- :ref:`c2c-release-notes-1.11`
17+
- :ref:`c2c-release-notes-1.12`
1818

1919
Previous Releases
2020
~~~~~~~~~~~~~~~~~
2121

22+
- :ref:`c2c-release-notes-1.11`
2223
- :ref:`c2c-release-notes-1.10`
2324
- :ref:`c2c-release-notes-1.9`
2425
- :ref:`c2c-release-notes-1.8`
@@ -37,6 +38,7 @@ Previous Releases
3738
.. toctree::
3839
:titlesonly:
3940

41+
1.12 </release-notes/1.12>
4042
1.11 </release-notes/1.11>
4143
1.10 </release-notes/1.10>
4244
1.9 </release-notes/1.9>

source/release-notes/1.12.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.. _c2c-release-notes-1.12:
2+
3+
================================
4+
Release Notes for mongosync 1.12
5+
================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 2
13+
:class: singlecol
14+
15+
This page describes changes and new features introduced in
16+
{+c2c-full-product-name+} 1.12.
17+
18+
.. _1.12.0-c2c-release-notes:
19+
20+
1.12.0 Release
21+
--------------
22+
23+
``enableUserWriteBlocking`` parameters
24+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25+
26+
The ``enableUserWriteBlocking`` parameter in the
27+
:ref:`/start <c2c-api-start>` API now accepts the following string options:
28+
29+
- ``"sourceAndDestination"`` for dual write-blocking
30+
- ``"none"`` for no write-blocking
31+
32+
Use these options instead of the old ``true`` and ``false`` values.
33+
``enableUserWriteBlocking`` still supports ``true`` and ``false``
34+
for backward compatibility.
35+
36+
See :ref:`c2c-api-start-params`.
37+
38+
Live Upgrades
39+
~~~~~~~~~~~~~
40+
41+
:ref:`Live upgrades <c2c-versioning-live-upgrade>`
42+
to version 1.12 are not supported.

source/reverse-sync.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Before you can reverse your sync direction, you must configure
3030
following parameters:
3131

3232
- ``reversible`` to ``true``
33-
- ``enableUserWriteBlocking`` to ``true``.
33+
- ``enableUserWriteBlocking`` to ``"sourceAndDestination"``.
3434

3535
For more information on limitations and requirements of reversing sync,
3636
see :ref:`c2c-api-reverse`.

source/topologies/multiple-mongosyncs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,5 +311,5 @@ instance that is running on ``mongosync01Host`` and using ``port
311311
.. note::
312312

313313
Reverse synchronization is only possible if ``reversible`` and
314-
``enableUserWriteBlocking`` are both set to ``true`` when the
314+
``enableUserWriteBlocking`` are both set to ``"sourceAndDestination"`` when the
315315
:ref:`start API <c2c-api-start>` initiates ``mongosync``.

0 commit comments

Comments
 (0)