basho/bitcask — pull request #175 by engelsanchez (2014-07-02 01:40:36+00:00)
Title: Bugfix/fold open delete race

This is a fix for basho/bitcask#174. It changes the opening of files for a fold to use a list from the file stats in the keydir instead of whatever is lying around on the cask, which could result in missing just deleted files.

One interesting thing about the change: folds will tend to file if an operator deletes a good number of files from the directory by mistake, etc. So a little protection had to be added to detect that and avoid having folds retrying to open the same missing files over and over. Eventually they will succeed and fold over the incomplete data set.