basho/bitcask — pull request #67 by jtuple (2012-11-02 22:25:37+00:00)
Title: Add bitcask:is_empty_estimate

Add bitcask:is_empty_estimate to quickly determine if a bitcask contains no data. Currently, determining if a bitcask has data requires folding over the keydir to ensure tombstones and expired keys are skipped. However, this is a potentially blocking operation and no where in Riak do we actually need perfect knowledge.

The estimate is determined from the bitcask stats, which may overcount data, but will not undercount. Therefore, the estimated result may return false when the bitcask is actually empty, but it will never return true when there is data.

See issue: basho/riak_kv#423