diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-15 17:01:22 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-15 17:01:22 +0100 |
| commit | 01a3a784a510263a61cf8509c434460225864f6e (patch) | |
| tree | 7a49cf12345efd28c4b0a38887f17ef995efff7d /src | |
| parent | c8c758f69387a1ec9f8503744997525df576eb55 (diff) | |
| download | rabbitmq-server-git-01a3a784a510263a61cf8509c434460225864f6e.tar.gz | |
don't attempt to recover file summary when we know there isn't one
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_msg_store.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 74c23f1e4c..1acc79d01a 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -506,7 +506,7 @@ init([Server, BaseDir, ClientRefs, StartupFunState]) -> {ok, IndexModule} = application:get_env(msg_store_index_module), rabbit_log:info("~w: using ~p to provide index~n", [Server, IndexModule]), - FoundCrashedCompactions = + AttemptFileSummaryRecovery = case ClientRefs of undefined -> ok = rabbit_misc:recursive_delete([Dir]), ok = filelib:ensure_dir(filename:join(Dir, "nothing")), @@ -519,8 +519,7 @@ init([Server, BaseDir, ClientRefs, StartupFunState]) -> %% file_summary nor the location index. Note the file_summary is %% left empty here if it can't be recovered. {FileSummaryRecovered, FileSummaryEts} = - recover_file_summary(not FoundCrashedCompactions, Dir, Server), - %% FileSummaryRecovered => not FoundCrashedCompactions + recover_file_summary(AttemptFileSummaryRecovery, Dir, Server), {CleanShutdown, IndexState, ClientRefs1} = recover_index_and_client_refs(IndexModule, FileSummaryRecovered, @@ -1239,7 +1238,7 @@ recover_crashed_compactions(Dir) -> ok = recover_crashed_compaction( Dir, TmpFileName, NonTmpRelatedFileName) end, TmpFileNames), - [] =/= TmpFileNames. + TmpFileNames == []. recover_crashed_compaction(Dir, TmpFileName, NonTmpRelatedFileName) -> %% Because a msg can legitimately appear multiple times in the |
