Skip to main content
This content is for SDK V4. For the latest version, see the V5 documentation.
This feature is available in SDK version 4.12.0 and later.
This feature works fully with DQL Strict Mode disabled. DQL_STRICT_MODE=falseRead more about STRICT MODE and upcoming v5 behavior
The system:data_sync_info collection provides real-time information about synchronization status between your device and other peers in the Ditto mesh network.

What You Can Monitor

  • Connection status with peers and cloud servers
  • Sync progress using commit IDs
  • Last update timing from each peer

Document Structure

Each document in system:data_sync_info represents one peer connection:

Key Fields

  • _id - Unique peer identifier
  • is_ditto_server - true for cloud servers, false for other devices
  • sync_session_status - "Connected", "Not Connected", or "Disabled"
  • synced_up_to_local_commit_id - Latest commit ID synced to this peer
  • last_update_received_time - Unix timestamp of last data received

Basic Queries

The examples in this document assume DQL Strict Mode is disabled.If DQL Strict Mode is enabled the collection definition must be provided.COLLECTION system:data_sync_info (documents MAP)Read more about STRICT MODE and upcoming v5 behavior

Get All Peers

Get Only Cloud Servers

Get Connected Peers Only

Get Specific Fields

Example in Code

Observing Changes

Observers on system:data_sync_info result in the callback triggering every 500ms even when the result remains the same. This frequency can be configured using the live_query_system_collection_refresh_interval system parameter.
Use registerObserver to monitor sync status changes in real-time:

Using Commit IDs

Every data modification returns a commit ID that you can use to track sync progress:
Compare this commit ID with synced_up_to_local_commit_id to see if a peer has received your change.

Important Notes

Sync status information is local-only and never synchronizes between peers. Each peer maintains its own view of sync status.
  • Commit IDs are monotonic (always increasing) but not necessarily sequential
  • Multiple cloud servers may appear due to load balancing or failover
  • Local-only data - this collection exists only on your device
  • Minimal performance impact - observing sync status is lightweight

Supported APIs