basho/bitcask — pull request #87 by bsparrow435 (2013-04-25 14:31:03+00:00)
Title: Change behavior of merge when merging for data expiration

If and only if a data files reason for merge is data_expiry, remove entries from keydir and delete the file instead of doing the normal merge process. In conjunction with this change, instead of expiry merge threshold being calculated off of oldest timestamp in file, use newest. Therefore. files will only be expired if all entries in the file are expired. This eliminates the need to fold over the data file when merging for expiry and saves the need to fold over the same values.

Currently L#694 will add the file to the list of expired files if the only reason for merge is data_expiry. However, in the future this could be changed to add to list if any one of the reasons for merge is data_expiry as all the entries in the file have been expired.