@@ -5,16 +5,15 @@ About ``mongosync``
5
5
====================
6
6
7
7
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.
12
12
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.
18
17
19
18
How ``mongosync`` Works
20
19
-----------------------
@@ -27,17 +26,17 @@ clusters before it can start to sync data. For more information, see
27
26
:ref:`c2c-connecting`.
28
27
29
28
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.
31
30
32
31
During Sync
33
32
~~~~~~~~~~~
34
33
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.
41
40
42
41
For every collection on the source, ``mongosync`` creates a corresponding
43
42
collection on the destination.
@@ -47,50 +46,54 @@ the ``RUNNING`` state and changes these back to their source
47
46
cluster characteristics during the ``COMMIT`` state. For more information, see
48
47
:ref:`Commit Alters <c2c-commit-alters>`.
49
48
49
+ The :ref:`start <c2c-api-start>` endpoint begins the ``RUNNING`` state.
50
+
51
+ .. _c2c-collection-copy:
52
+
50
53
Collection Copy
51
54
'''''''''''''''
52
55
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:
57
62
58
63
Change Event Application
59
64
''''''''''''''''''''''''
60
65
61
66
The change event application (CEA) process continuously updates
62
67
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
64
69
collection copy before starting the CEA process.
65
70
66
71
During CEA, ``mongosync`` receives :ref:`change stream <changeStreams>` events
67
72
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.
71
74
72
75
Pausing Sync
73
76
~~~~~~~~~~~~
74
77
78
+ During the ``PAUSED`` state, the sync process is paused.
79
+
75
80
The :ref:`pause <c2c-api-pause>` endpoint begins the
76
81
:ref:`PAUSED <c2c-state-paused>` state.
77
82
78
- During the ``PAUSED`` state, the sync process is paused.
79
-
80
83
The :ref:`resume <c2c-api-resume>` endpoint resumes a paused synchronization
81
84
session and returns ``mongosync`` to the ``RUNNING`` state.
82
85
83
86
Finalizing Sync
84
87
~~~~~~~~~~~~~~~
85
88
86
- The :ref:`commit <c2c-api-commit>` endpoint begins the
87
- :ref:`COMMITTING <c2c-state-committing>` state.
88
-
89
89
During the ``COMMITTING`` state, ``mongosync`` finalizes the sync between the
90
90
source cluster and the destination cluster by stopping continuous sync
91
91
between them. It also restores collection characteristics that ``mongosync``
92
92
temporarily alters during synchronization.
93
93
94
+ The :ref:`commit <c2c-api-commit>` endpoint begins the
95
+ :ref:`COMMITTING <c2c-state-committing>` state.
96
+
94
97
Once you call the ``commit`` endpoint, ``mongosync`` halts any writes on the
95
98
source cluster and retrieves the timestamp of the most recent operation in the
96
99
source cluster.
@@ -100,22 +103,22 @@ processing events up until the commit timestamp. Then, ``mongosync`` corrects
100
103
indexes and resolves document conflicts. If write blocking is enabled,
101
104
``mongosync`` turns write operations back on.
102
105
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.
107
110
108
111
Reversing Sync
109
112
~~~~~~~~~~~~~~
110
113
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
-
115
114
During the ``REVERSING`` state, ``mongosync`` copies data from the
116
115
destination cluster to the source cluster. Then, ``mongosync`` swaps the source
117
116
and destination clusters and resumes applying change events.
118
117
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
+
119
122
If the reverse sync is successful, ``mongosync`` enters the ``RUNNING`` state.
120
123
The synchronization continues in the reverse direction from the original
121
124
sync job.
0 commit comments