basho/bitcask — pull request #198 by engelsanchez (2014-09-16 19:49:20+00:00)
Title: Fix race listing readable files

A race existed as demonstrated by the newly added
list_data_files_race_test test. When listing readable files from a
Bitcask directory for merging and such, the current write or merge
output files should never be listed along with the other files. This
could lead to merges trying to read active files while they are being
written.

Now, the code fetches the current merge and write files, lists the
directory contents, filtering those out, and checks again if the merge
and write file have changed. If they have, we try again, only succeeding
if no changes have happened in between.

This PR also removes some code that seems to indicate somebody saw
the race at some point. Alas, it was fixed in a crazy, crazy way.

This addresses issue #194