Purging via sync gateway deletes documents. But they come back when sync gateway restarted


#1

Hi,

I am trying to delete documents created in sync gateway( and by deleting I mean removing them physically also from sync gateway bucket). For this I used the _pruge provided here. But the issue is that when I purge documents I can see documents physically deleted also but as soon as I restart sync gateway those documents come back in the sync gateway bucket. Seems like sync gateway is having documents in its memory which I cannot delete from its memory so when it is restarted all documents come back again


#2

@yagyank.chadha

Do you have any active Couchbase Lite clients replicating to your sync gateway instance, it’s possible that they are pushing the document back up to Sync Gateway after a restart.


#3

My Bad. I had bucket shadowing which caused this problem but now after removing that I still am getting the below error in sync gateway terminal

2016-05-11T18:42:51.445+05:30 HTTP:  #003: POST /sync_gateway/_purge  (ADMIN)
2016-05-11T18:42:51.446+05:30 CRUD: purging document = Yagyank_doc1
2016-05-11T18:42:51.669+05:30 WARNING: changeCache: Error unmarshaling doc "Yagyank_doc1": unexpected end of JSON input -- db.(*changeCache).DocChanged.func1() at change_cache.go:327