From f83b0973f2b9f06f4e68a0c9e75ede331018c92c Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Tue, 6 Oct 2015 22:43:19 -0500 Subject: [PATCH] Have to call filename mgr with FluName --- src/machi_flu_metadata_mgr.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/machi_flu_metadata_mgr.erl b/src/machi_flu_metadata_mgr.erl index 9169208..0ef2185 100644 --- a/src/machi_flu_metadata_mgr.erl +++ b/src/machi_flu_metadata_mgr.erl @@ -146,7 +146,8 @@ handle_info({'DOWN', Mref, process, Pid, normal}, State = #state{ tid = Tid }) - clear_ets(Tid, Mref), {noreply, State}; -handle_info({'DOWN', Mref, process, Pid, file_rollover}, State = #state{ tid = Tid }) -> +handle_info({'DOWN', Mref, process, Pid, file_rollover}, State = #state{ fluname = FluName, + tid = Tid }) -> lager:info("file proxy ~p shutdown because of file rollover", [Pid]), R = get_md_record_by_mref(Tid, Mref), [Prefix | _Rest] = machi_util:parse_filename({file, R#md.filename}), @@ -156,7 +157,7 @@ handle_info({'DOWN', Mref, process, Pid, file_rollover}, State = #state{ tid = T %% sequence number it probably will be associated with a different metadata %% manager. That's why we don't want to generate a new file name immediately %% and use it to start a new file proxy. - ok = machi_flu_filename_mgr:increment_prefix_sequence({prefix, Prefix}), + ok = machi_flu_filename_mgr:increment_prefix_sequence(FluName, {prefix, Prefix}), %% purge our ets table of this entry completely since it is likely the %% new filename (whenever it comes) will be in a different manager than