Synchronization between Atlas and Device Sync has been stopped, due to error:
non-recoverable error processing event: dropping namespace ns='db.collection' being synchronized with Device Sync is not supported. Sync cannot be resumed from this state and must be terminated and re-enabled to continue functioning.
Now I know from other threads that this happens when you drop a collection. But how do I fix it? I’ve terminated the sync and re-enabled it twice but the same error persists.
Thanks for posting! Can you confirm that you followed these instructions to terminate sync? Note that if you have drafts enabled, you’ll need to deploy the draft in between terminating and re-enabling for the termination to go through.
As Realm/Device Sync does not automatically do this, so when something happens to disconnect Device Sync from the clients, you’ll never recover and your app will be in a pit of doom. But luckily, there is a super easy fix that isn’t in the QuickStart guides but should be so people are aware you need this functionality.
You can find this by going to Mongodb.com going to search, type in Language + Client Reset Logic.
This was it, thank you so much - I had not deployed the change in between termination and re-syncing.
I knew immediately that’s what the issue was, I used to support Realm/Device Sync/App Services for 2 years working for MBD.
The reason Kiro didn’t mention this, is because Client Reset Logic is literally unknown to people in other areas of MBD, and those inside Realm have no idea it exists unless someone more senior to them mentions it like I mentioned it to you.
Client Reset Logic is important because it allows your app to recover after issues like this, anytime the app client disconnects from Sync for literally any reason, even a period of time offline, it will fail to ever sync again if this isn’t in place.
Client Reset Logic if it’s not in place can cause global app outages should a major event take place.
This is MongoDB Device Syncs/Realm’s most critical recovery feature, and I know you were not aware it existed, which is why I’m clarifying this and bringing it to your attention.