basho/bitcask — pull request #186 by engelsanchez (2014-09-04 16:01:05+00:00)
Title: Bugfix/key transform crash

When merging completely expired files, we fold over them issuing
conditional keydir deletes on the entries of the file. That way, if any
of them are still present in the keydir, they will be deleted now
instead of the usual lazy delete on read, when we detect they are
expired.

Previously, the code was not accounting for the new {tombstone, Key}
return format when folding over the hintfile. A recent change in 1.7.0
added a tombstone bit flag to hintfiles, so now we can tell we are
dealing with a tombstone without inspecting the data file. The tuple was
being passed whole to the userdefined key transformation function, causing
a crash. With this change, we simply skip over tombstones. It makes no
sense to try to delete them from the keydir.

This fixes basho/bitcask#185 in the 1.7 branch (Bitcask shipped with Riak 2.0.0).
When merged, this should be ported or merged to the develop branch also.