Skip to content

Commit

Permalink
Use the correct counter name for segment writer.
Browse files Browse the repository at this point in the history
Else all Ra systems would use the same key and you would
only get segment writer counters for the last system to
start.
  • Loading branch information
kjnilsson committed May 18, 2023
1 parent cf813d4 commit 61f2d0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ra_log_segment_writer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ await(SegWriter) ->
%%%===================================================================

init([#{data_dir := DataDir,
name := SegWriterName,
system := System} = Conf]) ->
process_flag(trap_exit, true),
CRef = ra_counters:new(?MODULE, ?COUNTER_FIELDS),
CRef = ra_counters:new(SegWriterName, ?COUNTER_FIELDS),
SegmentConf = maps:get(segment_conf, Conf, #{}),
{ok, #state{system = System,
data_dir = DataDir,
Expand Down

0 comments on commit 61f2d0c

Please sign in to comment.