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

Commit 85fe906

Browse files
authored
DOCSP-46893: Destination-only Write-blocking (#581)
* initial commit.. * little fix * changes * release notes * feedback * little changes * feedback * table first draft * typo * de-modify * small fix * feedback
1 parent a7ba507 commit 85fe906

17 files changed

+135
-45
lines changed

source/faq.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ As a result, the destination is not guaranteed to match the source at any point
3333
For consistent reads, wait for the migration to :ref:`c2c-api-commit`. To learn more, see :ref:`mongosync-considerations`.
3434

3535
Performing writes to your destination cluster during synchronization results in undefined behavior.
36-
To block writes on the destination cluster during sync, enable :ref:`write blocking <c2c-write-blocking>` when you :ref:`c2c-api-start` ``mongosync``.
36+
``mongosync`` blocks writes on the destination cluster by default. To learn
37+
more about write-blocking, see :ref:`c2c-write-blocking` and :ref:`c2c-api-start`.
3738

3839
Upon commit, it is only safe to write to the destination cluster when ``canWrite`` is ``true``.
3940
To check the value of ``canWrite``, run the :ref:`c2c-api-progress` endpoint.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
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 enable the ``enableUserWriteBlocking`` option in the ``/start``
32-
request. Ensure that no writes are made to the source or destination cluster
33-
during the migration.
31+
- You can't set the ``enableUserWriteBlocking`` option to ``true``
32+
in the ``/start`` request, so dual write-blocking is not supported.
33+
Destination-only write-blocking is supported. Ensure that no writes are
34+
made to the source cluster after you call the ``/commit`` endpoint.
3435

3536
- You can't enable the ``createSupportingIndexes`` :ref:`sharding parameter
3637
<c2c-api-start-sharding>`. Instead, create an index to support your shard key
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The user specified in the ``mongosync`` connection string must have the
22
required permissions on the source and destination clusters. The
3-
permissions vary depending on your environment and if you want to run a
4-
write-blocking or reverse sync.
3+
permissions vary depending on your environment and if you want to
4+
modify write-blocking settings or use reverse sync.
55

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1-
``mongosync`` does not enable write-blocking by default. If you enable
2-
write-blocking, ``mongosync`` blocks writes:
1+
By default, ``mongosync`` enables destination-only
2+
write-blocking on the destination cluster.
3+
``mongosync`` unblocks writes right before the
4+
:ref:`/progress <c2c-api-progress>` endpoint reports
5+
that ``canWrite`` is ``true``. You can explicitly
6+
enable destination-only write-blocking by using
7+
the :ref:`/start <c2c-api-start>` endpoint to set
8+
``enableUserWriteBlocking`` to ``"destinationOnly"``.
39

4-
- On the destination cluster during sync.
5-
- On the source cluster when ``commit`` is received.
10+
You can enable dual write-blocking.
11+
If you enable dual write-blocking, ``mongosync`` blocks writes:
612

7-
To enable write-blocking, use the :ref:`start API <c2c-api-start>`
8-
to set ``enableUserWriteBlocking`` to ``true``. You cannot enable
9-
write-blocking after the sync starts.
13+
- On the destination cluster during the migration. ``mongosync``
14+
unblocks writes right before it sets ``canWrite`` to ``true``
15+
- On the source cluster after you call ``/commit``
16+
17+
To enable dual write-blocking, use :ref:`/start <c2c-api-start>`
18+
to set ``enableUserWriteBlocking`` to ``true``.
19+
20+
You can use
21+
:ref:`/start <c2c-api-start>`
22+
to set ``enableUserWriteBlocking`` to ``false``.
23+
24+
You cannot enable dual write-blocking or disable
25+
write-blocking after the sync starts.

source/includes/limitations-filtering.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@
1919
You cannot limit the filter to collections within the database.
2020

2121
For more information, see :ref:`c2c-filter-with-out`.
22+
- Filtering does not support dual :ref:`write
23+
blocking <c2c-write-blocking>`. You can use destination-only
24+
write-blocking.
2225

source/includes/live-upgrade.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ Starting in ``mongosync`` 1.7.0, you can upgrade ``mongosync`` without
22
restarting data synchronization operations from the beginning. You can
33
only live upgrade to ``mongosync`` 1.7.3 or later from ``mongosync``
44
1.7.2 or later.
5+
6+
.. important::
7+
8+
``mongosync`` does not support live upgrades to version 1.11.

source/includes/table-permissions-atlas.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
* - default
1414
- - atlasAdmin
1515
- - atlasAdmin
16-
17-
* - write-blocking, reversing, or multiple reversals
16+
- bypassWriteBlockMode privilege
17+
18+
* - dual write-blocking, reversing, or multiple reversals
1819
- - atlasAdmin
1920
- bypassWriteBlockMode privilege
2021
- - atlasAdmin

source/includes/table-permissions-self-hosted.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- :authrole:`readWriteAnyDatabase`
2222
- :authrole:`restore`
2323

24-
* - Write-blocking
24+
* - Dual Write-Blocking
2525
- - :authrole:`backup`
2626
- :authrole:`clusterManager`
2727
- :authrole:`clusterMonitor`

source/reference/api/commit.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,15 @@ characteristics that ``mongosync`` alters during the synchronization process.
168168
replicated as non-hidden on the destination cluster.
169169

170170
* - Write Blocking
171-
- If you enable write-blocking, ``mongosync`` blocks writes:
172-
171+
- If you enable dual write-blocking, ``mongosync`` blocks writes:
172+
173173
- On the destination cluster during sync.
174174
- On the source cluster when ``commit`` is received.
175175

176-
See also:
177-
:ref:`c2c-write-blocking`
176+
``mongosync`` enables destination-only write-blocking
177+
by default.
178+
179+
To learn more, see :ref:`c2c-write-blocking`.
178180

179181
* - Capped Collections
180182
- ``commit`` resets the required maximum size of capped collections

source/reference/api/reverse.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ To use the ``reverse`` endpoint:
4949

5050
.. note::
5151

52-
:ref:`c2c-write-blocking` is a prerequisite for running ``reverse``.
52+
:ref:`Dual write-blocking <c2c-write-blocking>` is a
53+
prerequisite for running ``reverse``.
5354

5455
You cannot update these options after the sync starts.
5556

0 commit comments

Comments
 (0)