Skip to content

Commit 1bc80c8

Browse files
(DOCSP-23020): sync states reference page (#26)
* WIP * (DOCSP-23020): sync states reference page * add widths * add bullets * wording * change ref location * change terminology to mongosync * change wording
1 parent 96bfca8 commit 1bc80c8

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

source/includes/api/tables/progress-response.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
* - ``state``
1111
- string
12-
- The current state of {+c2c-product-name+}.
12+
- The current state of ``mongosync``. For information on the
13+
possible states, see :ref:`c2c-states-descriptions`.
1314

1415
* - ``canCommit``
1516
- boolean

source/reference.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Reference
99

1010
/reference/mongosync
1111
/reference/api
12+
/reference/mongosync-states

source/reference/mongosync-states.txt

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.. _c2c-states:
2+
3+
====================
4+
``mongosync`` States
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+
16+
``mongosync`` enters different states depending on the requests it
17+
receives. This page describes the states that ``mongosync`` can be in.
18+
``mongosync`` is in a single state at a particular time. The possible
19+
API operations you can run depend on the state of ``mongosync``.
20+
21+
View the Current State
22+
----------------------
23+
24+
To view the current state of ``mongosync``, use the
25+
:ref:`/progress <c2c-api-progress>`. endpoint. The endpoint returns the
26+
state in the ``state`` field.
27+
28+
.. _c2c-states-descriptions:
29+
30+
State Descriptions
31+
------------------
32+
33+
The following table describes each state and the operations you can run
34+
when ``mongosync`` is in a given state.
35+
36+
.. list-table::
37+
:header-rows: 1
38+
:widths: 10 30 20
39+
40+
* - State
41+
- Description
42+
- Possible API Operations
43+
44+
* - ``IDLE``
45+
- ``mongosync`` is initialized and ready for a sync job to
46+
begin.
47+
- - ``POST`` :ref:`/start <c2c-api-start>`
48+
- ``GET`` :ref:`/progress <c2c-api-progress>`
49+
50+
* - ``RUNNING``
51+
- The sync process is currently running. In this state, data is
52+
initially synced to the destination cluster, and subsequent
53+
writes are applied.
54+
- - ``POST`` :ref:`/pause <c2c-api-pause>`
55+
- ``POST`` :ref:`/commit <c2c-api-commit>`
56+
- ``GET`` :ref:`/progress <c2c-api-progress>`
57+
58+
* - ``PAUSED``
59+
- The sync process is paused. To resume the sync process, send a
60+
request to the :ref:`/resume <c2c-api-resume>` endpoint.
61+
- - ``POST`` :ref:`/resume <c2c-api-resume>`
62+
- ``GET`` :ref:`/progress <c2c-api-progress>`
63+
64+
* - ``COMMITTING``
65+
- The cutover for the sync process has started. The time it takes
66+
to transition to the ``COMMITTED`` phase depends on
67+
``lagTimeSeconds``. To monitor ``lagTimeSeconds`` or see if
68+
``mongosync`` has finished committing, use the
69+
:ref:`/progress <c2c-api-progress>` endpoint.
70+
- - ``GET`` :ref:`/progress <c2c-api-progress>`
71+
72+
* - ``COMMITTED``
73+
- The cutover for the sync process is complete.
74+
- - ``GET`` :ref:`/progress <c2c-api-progress>`

0 commit comments

Comments
 (0)