Thanks for the response.
How we were able to get it into this state was by accident but here is the steps we did. I've been able to reproduce it a few times now.
- Allow the document with the same ID to be created and deleted more times than the revs_limit on the sync gateway (in our setup the default 1000 is set). In the test we have we are just doing it 1200 times
- wipe out the client CBL database
- connect the client and attempt to create the document using the same ID. In this case the document seq # will be 1-xyz however the server will have 1200-xyz
If the document seq count is less than revs_limit on the sync gateway it looks like the rev meta data for the deleted document is sync'ed but when it's over revs_limit I'm not seeing the meta data in the CBL database.
We are currently using Sync Gateway 1.4.0 and CBL 1.4.0, I haven't tried with 1.4.1 sync gateway as of yet but will do that soon.
On the server side we don't really need to delete the document, we were doing it to save space on the client but we could change is to have a simple status and remove the rest of document contents. Then the footprint on the client should be small.
I was more curious on what the expected behavior was and if what we were doing would be safe to continue.