Skip to content

Commit 282d494

Browse files
DOCSP-41105
1 parent 5ae28d3 commit 282d494

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

source/reference/about-mongosync.txt

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ About ``mongosync``
55
====================
66

77
The ``mongosync`` binary is the primary process used in {+c2c-product-name+}.
8-
``mongosync`` migrates data from one cluster to another and keeps the
9-
clusters in continuous sync. You can use ``mongosync`` to create dedicated
10-
analytics, development, or testing clusters that mirror your production
11-
environment.
8+
``mongosync`` migrates data from a source cluster to a destination cluster and
9+
keeps the clusters in continuous sync. You can use ``mongosync`` to create
10+
dedicated analytics, development, or testing clusters that mirror your
11+
production environment.
1212

13-
``mongosync`` keeps track of its current actions through states. ``mongosync``
14-
enters different states depending on the requests it receives. The current
15-
``mongosync`` state determines which API operations you can run.
16-
For more information on ``mongosync`` states, see
17-
:ref:`mongosync States <c2c-states>`.
13+
``mongosync`` keeps track of its current actions through
14+
:ref:`states <c2c-states>`. ``mongosync`` enters different states depending on
15+
the requests it receives. The current ``mongosync`` state determines which API
16+
operations you can run.
1817

1918
How ``mongosync`` Works
2019
-----------------------
@@ -27,17 +26,17 @@ clusters before it can start to sync data. For more information, see
2726
:ref:`c2c-connecting`.
2827

2928
When ``mongosync`` connects to the source and destination clusters, the
30-
synchronization process is in the :ref:`IDLE <c2c-state-idle>` state.
29+
synchronization process enters the :ref:`IDLE <c2c-state-idle>` state.
3130

3231
During Sync
3332
~~~~~~~~~~~
3433

35-
The :ref:`start <c2c-api-start>` endpoint begins the
36-
:ref:`RUNNING <c2c-state-running>` state.
37-
38-
During the sync, ``mongosync`` syncs data from the source cluster to the
39-
destination cluster. If you make subsequent writes to the source cluster,
40-
``mongosync`` applies the operations to the destination cluster.
34+
During the :ref:`RUNNING <c2c-state-running>` state, ``mongosync`` syncs data
35+
from the source cluster to the destination cluster through the
36+
:ref:`collection copy <c2c-collection-copy>` process. If you make subsequent
37+
writes to the source cluster, ``mongosync`` applies the operations to the
38+
destination cluster through the :ref:`change event application <c2c-cea>`
39+
process.
4140

4241
For every collection on the source, ``mongosync`` creates a corresponding
4342
collection on the destination.
@@ -47,50 +46,54 @@ the ``RUNNING`` state and changes these back to their source
4746
cluster characteristics during the ``COMMIT`` state. For more information, see
4847
:ref:`Commit Alters <c2c-commit-alters>`.
4948

49+
The :ref:`start <c2c-api-start>` endpoint begins the ``RUNNING`` state.
50+
51+
.. _c2c-collection-copy:
52+
5053
Collection Copy
5154
'''''''''''''''
5255

53-
Collection copy is the initial full data transfer that copies each collection
54-
from the source cluster to the destination cluster. ``mongosync`` performs
55-
collection copy by splitting each source collection into partitions and copying
56-
all the partitions to their corresponding destination collections.
56+
The collection copy process is the initial full data transfer that copies each
57+
collection from the source cluster to the destination cluster. ``mongosync``
58+
performs collection copy by splitting each source collection into partitions
59+
and copying all the partitions to their corresponding destination collections.
60+
61+
.. _c2c-cea:
5762

5863
Change Event Application
5964
''''''''''''''''''''''''
6065

6166
The change event application (CEA) process continuously updates
6267
the destination cluster when you make changes to the source cluster. If there
63-
are multiple ``mongosync`` instances, all the ``mongosync`` instances finish
68+
are multiple ``mongosync`` instances, all instances finish
6469
collection copy before starting the CEA process.
6570

6671
During CEA, ``mongosync`` receives :ref:`change stream <changeStreams>` events
6772
from the source cluster, converts these events into writes, and applies these
68-
writes on the destination cluster. CEA ensures that :ref:`CRUD <crud>` and
69-
:ref:`DDL <c2c-mongosync-ddl>` events from the source cluster are accurately
70-
applied to the destination cluster.
73+
writes on the destination cluster.
7174

7275
Pausing Sync
7376
~~~~~~~~~~~~
7477

78+
During the ``PAUSED`` state, the sync process is paused.
79+
7580
The :ref:`pause <c2c-api-pause>` endpoint begins the
7681
:ref:`PAUSED <c2c-state-paused>` state.
7782

78-
During the ``PAUSED`` state, the sync process is paused.
79-
8083
The :ref:`resume <c2c-api-resume>` endpoint resumes a paused synchronization
8184
session and returns ``mongosync`` to the ``RUNNING`` state.
8285

8386
Finalizing Sync
8487
~~~~~~~~~~~~~~~
8588

86-
The :ref:`commit <c2c-api-commit>` endpoint begins the
87-
:ref:`COMMITTING <c2c-state-committing>` state.
88-
8989
During the ``COMMITTING`` state, ``mongosync`` finalizes the sync between the
9090
source cluster and the destination cluster by stopping continuous sync
9191
between them. It also restores collection characteristics that ``mongosync``
9292
temporarily alters during synchronization.
9393

94+
The :ref:`commit <c2c-api-commit>` endpoint begins the
95+
:ref:`COMMITTING <c2c-state-committing>` state.
96+
9497
Once you call the ``commit`` endpoint, ``mongosync`` halts any writes on the
9598
source cluster and retrieves the timestamp of the most recent operation in the
9699
source cluster.
@@ -100,22 +103,22 @@ processing events up until the commit timestamp. Then, ``mongosync`` corrects
100103
indexes and resolves document conflicts. If write blocking is enabled,
101104
``mongosync`` turns write operations back on.
102105

103-
``mongosync`` updates its state to :ref:`COMMITTED <c2c-state-committed>` once
104-
the ``COMMITTING`` state is over. The ``COMMITTED`` state indicates the
105-
:ref:`cutover process <c2c-cutover-process>` is finished, and you can direct
106-
writes to the destination cluster.
106+
When the above process is completed, ``mongosync`` enters the
107+
:ref:`COMMITTED <c2c-state-committed>` state. The ``COMMITTED`` state indicates
108+
that the :ref:`cutover process <c2c-cutover-process>` is finished, and you can
109+
direct writes to the destination cluster.
107110

108111
Reversing Sync
109112
~~~~~~~~~~~~~~
110113

111-
The :ref:`reverse <c2c-api-reverse>` endpoint starts the
112-
:ref:`REVERSING <c2c-state-reversing>` state. To use the ``reverse`` endpoint,
113-
``mongosync`` must be in the ``COMMITTED`` state.
114-
115114
During the ``REVERSING`` state, ``mongosync`` copies data from the
116115
destination cluster to the source cluster. Then, ``mongosync`` swaps the source
117116
and destination clusters and resumes applying change events.
118117

118+
The :ref:`reverse <c2c-api-reverse>` endpoint starts the
119+
:ref:`REVERSING <c2c-state-reversing>` state. To use the ``reverse`` endpoint,
120+
``mongosync`` must be in the ``COMMITTED`` state.
121+
119122
If the reverse sync is successful, ``mongosync`` enters the ``RUNNING`` state.
120123
The synchronization continues in the reverse direction from the original
121124
sync job.

0 commit comments

Comments
 (0)