Docs Menu

Docs HomeMongoDB Cluster-to-Cluster Sync

progress

On this page

  • Description
  • Request
  • Response
  • Behavior
  • Example
  • Request
  • Response

Returns the status of the synchronization process.

GET /api/v1/progress

All response fields are wrapped in a top-level progress object.

Field
Type
Description
state
string
The current state of mongosync. For information on the possible states, see State Descriptions.
canCommit
boolean
If true, indicates that a commit request will succeed. This also means that the initial sync has completed and is applying change events.
canWrite
boolean
If true, indicates that it is possible to write to the destination cluster. Index validation continues until the commit is complete.
info
string

Provides extra information on the synchronization progress. Possible info values include:

  • "collection copy"

  • "change event application"

  • "waiting for commit to complete"

  • "commit completed"

lagTimeSeconds
integer
Time in seconds between the last applied event and time of the current latest event.
collectionCopy
object
Describes the total amount of data being copied and the amount that has already been copied to the destination cluster.
collectionCopy.estimatedTotalBytes
integer
Estimated total number of bytes to be copied.
collectionCopy.estimatedCopiedBytes
integer
Estimated number of bytes which have been copied to the destination cluster.
directionMapping
object
Describes the mapping direction for the synchronization, namely the source and destination clusters.
directionMapping.Source
string
Source cluster. Returned in the form <cluster name>: <host>:<port>.
directionMapping.Destination
string
Destination cluster. Returned in the form <cluster name>: <host>:<port>.
  • When mongosync is in the IDLE state, all output fields except state and canCommit are null.

  • When mongosync is in the PAUSED state, the lagTimeSeconds field is null.

  • The endpoint does not auto-refresh. To get updated status, call the progress endpoint again.

The following example returns the status of the synchronization process.

curl localhost:27182/api/v1/progress -XGET
{
"progress":
{
"state":"RUNNING",
"canCommit":true,
"canWrite":false,
"info":"change event application",
"lagTimeSeconds":0,
"collectionCopy":
{
"estimatedTotalBytes":694,
"estimatedCopiedBytes":694
},
"directionMapping":
{
"Source":"cluster0: localhost:27017",
"Destination":"cluster1: localhost:27018"
}
}
}
←  startpause →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.