Why empty documents are creating in database?

Hi There,

I have been observing, in our database few empty documents are created but it has some metadata. why these kind of documents are creating and how can we overcome this problem?

please find attached screenshots.

An instance where this would happen is if you tried to delete a non-existent document. This creates a “non-tombstone” or a tombstone with an empty body.
Which version of Sync Gateway are you using? I believe that this issue should be resolved in our latest version 2.8.1 of sync gateway although I can’t seem to confirm that in the release notes . @JRascagneres - can you confirm if this is in 2.8.1?

Hi @priya.rajagopal Thank you for your response.

Yes, we are using Couchbase Sync Gateway/2.8.1 but still, I saw a few empty documents.


Hi. Priya is correct. Prior to 2.8.1 this could occur if a new document was created in the deleted state. This should no longer happen in 2.8.1, however, any documents already in that state won’t have been cleaned up. To cleanup those documents an additional mutation will need to be triggered on the document to clean them up. An additional DELETE REST call on this document would remove it or you could construct a query to do this too.