mongosync
States
On this page
mongosync
enters different states depending on the requests it
receives. mongosync
can only be in a single state at a given time.
The current mongosync
states determines which API operations you can
run.
Note
Most state transitions happen as the result of an API call. The exceptions are:
The transition from
COMMITTING
toCOMMITTED
. For more information, see Finalizing Sync.The transition from
REVERSING
toRUNNING
. For more information, see Reversing Sync.
This page describes mongosync
states.
View the Current State
To view the current state of mongosync
, use the /progress. endpoint. The /progress
endpoint returns the state in the state
field.
Note
Starting in mongosync
1.7.3, mongosync
can take at least two minutes
to respond when you resume or restart a sync operation. During this time,
any calls to the progress
endpoint might fail. If a
progress
call fails, it is safe to retry.
State Descriptions
The following table describes each state and lists the permitted operations in that state.
State | Description | Possible API Operations |
---|---|---|
|
| |
| The sync process is currently running. In this state, data is initially synced to the destination cluster. Subsequent writes to the source cluster are applied to the destination cluster. | |
| The sync process is paused. To resume the sync process, send a request to the /resume endpoint. | |
| The cutover for the sync process has started. The time it takes
to transition to the |
|
| The cutover for the sync process is complete. | |
| The sync process copies metadata from the destination cluster to the source cluster. Then, MongoDB swaps the source and destination clusters and resumes applying change events. |
|