Realm Sync - how to overcome synch issues when client sent a defect record?

Hi all,

a general question maybe - but I dont know how one is supposed to handle this in a production environment.

Suppose Realm Synch is enabled, app fully tested - everything synching nicely and all looks great. Now for some reason a client sends a record with a null value in the _partition field (or any other corrupt record). This leads to a “BadChangeset” error on Atlas with an error like

failed to validate upload changesets: UPDATE instruction had incorrect partition value for key “_partition” { expectedPartition: provider=60743f95721ee1a809b1b970, foundPartition: } (ProtocolErrorCode=212)

So in effect this one defect record prevents the entire synch from working - it just never gets passed this point. To date I haven’t figured out the best way to overcome this situation, especially if the data corruption happens on a device 1000 miles away from me.

What is the fixing strategy for this kind of scenario? Typically I’d assume that I can somehow ‘edit the changeset’ in an error file, add the missing partition and all will resume working as by magic. I have tried fixing the record on the device, but that didnt sort out the synch issues on the server. On the server I cant help as I dont get to see the offending record and cant fix it. How are productive apps dealing with this scenario? And if I reset a client, stop synch, restart synch - this sounds like a huge overkill to me for what effectively is “just a faulty record”. I’d assume the synch stop affects all clients across the board … and there might be hundreds of them.

This is a general question to everyone - please do share your experience you have gained if you have a live app with RealmSynch! …