diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-15 15:02:30 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-15 15:02:30 +0100 |
| commit | 7c38e9b288e4093dd2e9ec8c8d562b523da19740 (patch) | |
| tree | aa3a778cc2043c1bbafcd9764bd06f6ac41ff17c | |
| parent | bc5c59a00812d502f2472815440996908988d272 (diff) | |
| download | rabbitmq-server-git-7c38e9b288e4093dd2e9ec8c8d562b523da19740.tar.gz | |
now it compiles
| -rw-r--r-- | src/rabbit_msg_store.erl | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 3d01912416..040829a3d8 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -506,17 +506,11 @@ init([Server, BaseDir, ClientRefs, {MsgRefDeltaGen, MsgRefDeltaGenInit}]) -> {ok, IndexModule} = application:get_env(msg_store_index_module), rabbit_log:info("~w: using ~p to provide index~n", [Server, IndexModule]), - FoundCrashedCompactions = - case ClientRefs of - undefined -> %% we're going to wipe everything anyway - false; - _ -> - FileNames = list_sorted_file_names(Dir, ?FILE_EXTENSION), - TmpFileNames = list_sorted_file_names(Dir, ?FILE_EXTENSION_TMP), - recover_crashed_compactions(Dir, FileNames, TmpFileNames) - end, - - FoundCrashedCompactions = recover_crashed_compactions(Dir), + FoundCrashedCompactions = case ClientRefs of + %% we're going to wipe everything anyway + undefined -> false; + _ -> recover_crashed_compactions(Dir) + end, %% if we found crashed compactions we trust neither the %% file_summary nor the location index. Note the file_summary is @@ -1316,7 +1310,7 @@ build_index(true, State = #msstate { file_summary_ets = FileSummaryEts }) -> sum_file_size = SumFileSize + FileSize, current_file = File }} end, {0, State}, FileSummaryEts); -build_index(false, State = #mssstate { dir = Dir }) -> +build_index(false, State = #msstate { dir = Dir }) -> {ok, Pid} = gatherer:start_link(), case [filename_to_num(FileName) || FileName <- list_sorted_file_names(Dir, ?FILE_EXTENSION)] of |
