On this page
You may want to alter your Device Sync configuration after you have already enabled Device Sync.
If you are using Partition-Based Device Sync, and want to change the
you can terminate and re-enable Device Sync.
If you are using Flexible Device Sync and want to add or remove queryable fields, you can do so immediately, without terminating Device Sync.
You must Terminate Device Sync and Re-enable Device Sync to make changes to your Partition-Based Device Sync Configuration. While you are re-enabling Atlas Device Sync, you can specify a new Partition Key, or changes to your Read/Write Permissions. Making changes to your Device Sync configuration while terminating and re-enabling Device Sync will trigger a client reset. To learn more about handling client resets, read the client reset documentation.
To alter your Flexible Device Sync Configuration, you can add or remove fields in the Atlas App Services UI while Device Sync is enabled without terminating and re-enabling Device Sync.
To add a queryable field, navigate to the Device Sync configuration screen through the left navigation menu. Under the Select Queryable Fields heading, you can create a new field(s) to construct a query on. Finally, make sure to click Enable Device Sync to finish adding your queryable field and enable Device Sync.
Devices using this new field will only be able to Device Sync on this field once the device has caught up to the point in time in Device Sync History where the field was added.
To remove a queryable field, navigate to the Sync configuration screen through the left navigation menu. Under the Select Queryable Fields heading, you can click the x button next to the field you wish to delete. Finally, make sure to click Enable Device Sync to finish adding your queryable field and enable Device Sync.
When you remove a queryable field, any devices still using that field will have their Device Sync session dropped and receive a client reset. To learn more about handling client resets, read the client reset documentation. Clients that are not using this field, will continue syncing data normally without receiving any errors. To avoid triggering a client reset when you remove the queryable field in the Device Sync configuration screen, you should also remove this field on the client-side.
Making changes to permissions, whether implicitly through user metadata, or explicitly through changing configuration filters, will trigger a client reset and re-download of all Device Sync data with the new permissions applied.
A client reset will not be triggered under the following cases:
- Adding a new collection to a Device Sync schema, and defining permissions for the new namespace or using default roles. This will not trigger a client reset because permissions have not been applied previously.
- Configuring custom permissions for the new collection in the same draft as the new schema. Conversely, deploying a draft with permission changes after you deploy the schema will lead to a client reset, since default permissions were applied in the initial deployment.