On Dec 24, 2011, at 4:39 PM, Mark Hahn wrote: Some say nothing but minimal id/rev data is retained after deleting a doc … ... But some say the entire document is retained ...
Deleting a doc just adds a new revision (a “tombstone”) that’s marked as deleted. Compacting removes the space occupied by the contents of non-current revisions. Therefore, after deleting a doc and compacting, all that remains of it is the tombstone revision (and the revision tree, which is tiny). The source of confusion, I think, is that the tombstone may or may not contain just “minimal id/rev data”. Normally it will, if you used the DELETE method. But if you try to delete a document just by adding a “_deleted” property to it, you’ve literally(!) written your own tombstone, and that tombstone contains all the data of the previous revision because that’s what was in your PUT. This whole thread and the resulting confusion is all about that weird edge case of deleting by adding “_deleted”. The moral of the story is: don’t do that. I don’t know if that behavior is actively deprecated, but it seems unlikely to be what one would want to happen. —Jens
