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

Commit d36505c

Browse files
committed
sourceanddestination
1 parent 2df16b7 commit d36505c

File tree

9 files changed

+26
-23
lines changed

9 files changed

+26
-23
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 ``true`` or
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/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: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,31 @@ Request Body Parameters
115115
.. versionadded:: 1.3.0
116116

117117
* - ``enableUserWriteBlocking``
118-
- boolean or string
118+
- string or boolean
119119
- Optional
120-
- Supported options:
120+
- :gold:`IMPORTANT:` If you are migrating from a pre-6.0 source cluster,
121+
you cannot set this parameter.
121122

122-
- ``true`` or ``"sourceAndDestination"``: blocks writes on the destination
123+
Supported options:
124+
125+
- ``"sourceAndDestination"``: blocks writes on the destination
123126
cluster while the migration is in progress, and unblocks writes right
124127
before the :ref:`/progress <c2c-api-progress>` endpoint reports
125128
that ``canWrite`` is ``true``. Blocks writes on the source
126129
cluster after ``mongosync`` calls the :ref:`/commit <c2c-api-commit>`
127130
endpoint.
128-
129-
:gold:`IMPORTANT:` If you are migrating from a pre-6.0 source cluster,
130-
you cannot set ``enableUserWriteBlocking`` to ``true`` or
131-
``"sourceAndDestination"``.
132131

133-
- ``false`` or ``"none"``: no write blocking occurs.
132+
You can also use ``true`` for backward compatibility.
133+
134+
- ``"none"``: no write blocking occurs. You can also use ``false``
135+
for backward compatibility.
134136

135137
- ``"destinationOnly"``: blocks writes on the destination
136138
cluster while migration is in progress, and unblocks writes right
137139
before ``canWrite`` is ``true``.
138140

139141
To reverse sync, the ``enableUserWriteBlocking`` field must be set
140-
to ``true`` or ``"sourceAndDestination"``. To allow the source cluster
142+
to ``"sourceAndDestination"``. To allow the source cluster
141143
to accept writes again, for example after running migration tests,
142144
run the following command:
143145

source/reference/cutover-process.txt

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

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/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)