basho/bitcask — pull request #192 by engelsanchez (2014-09-09 19:03:37+00:00)
Title: Fix remove expired on read race

If an expired entry is found in they keydir on a read operation, the
code immediately and unconditionally deletes it. But the entry could
have been updated since the read, and we could end up deleting a new
value.

This commit changes the delete to be conditional. It will succeed only
if we are deleting exactly the same entry we found. If a newer entry is
found instead, the get operation is retried.

This addresses basho/bitcask#191