If you want to disable Atlas Device Sync for your app, you can temporarily pause or permanently terminate it. You can also re-enable Device Sync after disabling it.
Device Sync pauses automatically after 30 days of inactivity.
You can pause Device Sync for a period of time without disabling it entirely. When you pause Device Sync, you stop syncing changes between Atlas and your application.
Pausing Device Sync rejects any incoming client connections. This means that pausing Device Sync for your App stops syncing changes for all clients.
After pausing Device Sync, you can re-enable it. Pausing Device Sync maintains the configuration settings and all of the Device Sync metadata, which contains the sync history. When you re-enable paused Device Sync, your clients can reconnect normally.
If your oplog rolls past the time that you paused Device Sync, you must terminate and re-enable Device Sync. For example, if you only keep 12 hours of oplog for your cluster, and you pause Device Sync for longer than 12 hours, you must terminate and re-enable Device Sync.
Terminating and re-enabling paused Atlas Device Sync for your App erases Atlas Device Sync metadata and requires you to specify configuration settings again. Clients must perform a client reset when they reconnect after Atlas Device Sync has been terminated. For more information, see: Terminate Sync.
If you have enabled Device Sync, you may have to terminate and re-enable Device Sync under a few different circumstances:
An upgrade from a Shared Tier Atlas Cluster to a Shared or Dedicated instance
A move to an Atlas cluster that is distributed across regions/cloud providers
An upgrade to NVMe Atlas clusters
An oplog rollover
A paused Device Sync session on a shared tier cluster due to infrequent usage
Troubleshooting, at the request of MongoDB Support
Altering a Partition-Based Sync configuration
Switching between Sync modes. For instance, if you are switching from Partition-Based Sync to Flexible Sync
Dropping a collection you've used with Sync. For example, if you have a
Teamcollection that stores and syncs
Teamobjects, and then you drop that collection, you must terminate and re-enable Sync.
Restore Sync after Terminating Sync
When you terminate and re-enable Atlas Device Sync, clients can no longer Sync. Your client must implement a client reset handler to restore Sync. This handler can discard or attempt to recover unsynchronized changes.
After terminating Device Sync, you can re-enable it. Terminating Device Sync destroys the configuration settings and all of the Device Sync metadata, which contains the sync history. Re-enabling Sync requires you to complete the Sync configuration steps again. Clients that have previously connected cannot reconnect until they perform a client reset.
After you have paused or terminated Device Sync, you can re-enable it. Re-enabling Device Sync enables your App to begin syncing changes to Atlas again. After you re-enable Device Sync, your App begins accepting incoming client connections again.
Re-enabling Sync enables incoming client connections. However, under some circumstances, your client app code may need to perform a client reset before clients can Sync again.
Your code must handle a client reset when a client has previously connected with Device Sync, and you terminate Device Sync. Terminating Device Sync for your App erases Device Sync metadata that the client needs to reconnect.
This also applies to apps where Device Sync is paused longer than the oplog you keep for your cluster. For example, if you only keep 12 hours of oplog for your cluster, and you pause Device Sync for longer than 12 hours, you must terminate and re-enable Device Sync.
For information on how to perform a client reset in the client, refer to the SDK documentation: