Deleted and purged documents are getting synced back to couch base lite 1.4.1 with sync gateway 1.5.1

We purged some data through sync gateway but this was getting synced to couch base lite.

Even when this was not available on couch base server. This happened earlier also when we run the delete N1QL on couch-base but the documents kept on coming.

But until we restarted the sync gateway 4-5 times, the documents kept on coming. We have 500000 as cache size on sync gateway.

Secondly we marked a document as deleted from sync gateway on the same cluster but after 5-10 minutes those appeared again.

As of now we are down grading the server and sync gateway to 4.6.3 and 1.4.1.

Please let us know how this can happen.

A few questions to help understand your scenario:

  1. Are you running with enable_shared_bucket_access in your Sync Gateway config?
  2. What API are you using to purge data through Sync Gateway?
  3. How are you “marking a document as deleted from Sync Gateway”?

Thanks.

Yes in one of the sync gateway we are using this.

We are using sync gateway 1.5 Admin API to purge the documents.

By using _bulk_docs or delete rest API call of sync gateway.

You shouldn’t be using enable_shared_bucket_access on only a single node in a Sync Gateway cluster - the entire cluster needs to have this setting either enabled or disabled.

This could lead to the behaviour you’re seeing, as there’s different underlying behaviour for purge depending on how that value is set.