Browse files

On failed merge, print failed file and contine with the rest.

  • Loading branch information...
1 parent 2026001 commit c3d2f1a07e2952a8cae6ad18e45edcf813c761d8 @jonmeredith jonmeredith committed Feb 8, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/bitcask.erl
View
5 src/bitcask.erl
@@ -848,7 +848,10 @@ merge_files(#mstate { input_files = [File | Rest]} = State) ->
end,
case bitcask_fileops:fold(File, F, State) of
{error, Reason} ->
- {error, {File, Reason}, State#mstate { input_files = Rest }};
+ error_logger:error_msg("Merge failed while processing ~s:~p\n",
+ [bitcask_fileops:filename(File), Reason]),
+ merge_files(State#mstate { input_files = Rest });
+
State1 when is_record(State1, mstate) ->
merge_files(State1#mstate { input_files = Rest,
merged_files = [File | State1#mstate.merged_files] })

0 comments on commit c3d2f1a

Please sign in to comment.