We’re having a problem where documents that have been purged locally (on device using couchbase lite) are being replicated back down to the device on replication, despite there not being any updates to the documents on another device or on the server. Our serverside db is connected to sync-gateway and other than that we don’t perform any write operations on it. The documents we’re archiving are really old (1yr+), so it’s essentially impossible for all of them for a single user (15k+ at times) to be manually edited. This also doesn’t happen reliably, only for some devices, some of the time.
The only thing I can think of is that sync-gateway is performing a re-sync in the background for some reason, but we haven’t issued one explicitly.
A related thought is that a re-sync of our db may solve the problem if we build the same filter into sync gateway. In other words, if the app has a purge function that says:
if (doc > 1yr old) purge, and an equivalent statement to the sync function that says:
if (doc > 1yr old) reject, and then re-sync the db?
We’re currently using outdated architecture because of the removal of conflict resolution (we posted about it here), so are on cb lite 1.4, sync gateway 1.5 and couchbase server 5.0.
Is there anything else that could be causing this?