How to clean up sync_gateway channel chache


#1

I am using Sync Gateway with couchbase bucket, to get records from mobile devices and populate them in Cocuhbase bucket.
I have few 100 K reocrds in Couchbase bucket.

Now I have flushed the Bucket. Restarted sync gateway.
It is observed that few thousand deleted documents are again got populated in the couchbase bucket.

There is no possibility of getting the records from mobile devices as from mobile devices these records are already deleted.

Is there possibility that these records exist in sync_gateway channels and after bucket flush operation, they are getting populated in couchabse bucket, from sync_gateway channels ?
How to clean up sync_gateway channels ?
Is there any CLI command for it ?


#2

Deleted documents are kept as “tombstones”, so that the deletion can be propagated to other clients. (It has nothing to do with channels.)

If you’re sure all clients have seen the deletions, you can purge them using the SG REST API.