Couchbase Community Edition v5.1.1
Sync Gateway v1.5.2
I am using sync_gateway changes feed to sync a Couchbase bucket to my local database. The changes feed contains two docs which have been deleted, which are both marked as removed in the changes feed:
{“seq”:799515,“id”:"-K9q6dcHiQJHB-TBZzmzA7V",“deleted”:true,“removed”:[“grp:1”],“changes”:[{“rev”:“2-8537ed03ebb57e60bd995a33710bf615”}]}
,{“seq”:799518,“id”:"-okASJMiS4baYsJ9RmbsibX",“deleted”:true,“removed”:[“grp:1”],“changes”:[{“rev”:“2-03cf8e8434e2ef3731712cb43453cf2a”}]}
If I then try to get these docs for the full details, the first one gives a valid return with the doc marked as deleted, as I would expect:
Request:
https://localhost:4984/mydb/-K9q6dcHiQJHB-TBZzmzA7V?revs=true&latest=true&open_revs=%5B%222-8537ed03ebb57e60bd995a33710bf615%22%5D
Return:
[
{"ok":{"_deleted":true,"_id":"-K9q6dcHiQJHB-TBZzmzA7V","_rev":"2-8537ed03ebb57e60bd995a33710bf615","_revisions":{"ids":["8537ed03ebb57e60bd995a33710bf615","ae895c2f148cb6d4181f94b58a525db5"],"start":2}}}
]
However, the second one returns a missing property:
Request:
https://localhost:4984/mydb/-okASJMiS4baYsJ9RmbsibX?revs=true&latest=true&open_revs=%5B%222-03cf8e8434e2ef3731712cb43453cf2a%22%5D
Return:
[
{"missing":"2-03cf8e8434e2ef3731712cb43453cf2a"}
]
Why does the second one turn up in the changes feed if the doc/revision can’t be found?
What can I do to fix this so that it isn’t returned? Would a database purge help?
Thanks,
Giles