basho/bitcask — pull request #156 by engelsanchez (2014-04-22 20:56:24+00:00)
Title: Allow clean up of tombstones

One consequence of the recently merged in delete/merge race fix code that people other than Evan and I may not be aware is that non-expiring tombstones are effectively never cleaned up now. It is only safe to remove them during a full merge, as previous attempts to allow it resulted in races that could have resurrected old values. That is, if you are merging a sub-set of the files that contains a tombstone for K, there is no information available as to where other non-tombstone values for K are placed. The keydir contains up-to-date information about regular values only, which is why you can remove stale ones. Upon re-opening, a value in one of the remaining files will be picked up now that the tombstone is gone.

I'm not sure what the answers are for the short term 2.0 and longer term. Maybe we provide a tool for 2.0 users in case they need to reclaim disk space. Maybe we can fix it for 2.0.1 or 2.1 properly. Maybe somebody thinks that without an online solution to this, 2.0 can't ship. @jonmeredith @evanmcc @slfritchie Chime in to decide what milestone this should go into.