Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed Nov 19, 2024
1 parent dcc8027 commit 9b11ec3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ra_log_reader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ fetch_term(Idx, #?STATE{cfg = #cfg{} = Cfg} = State0) ->
segment_read_plan(_RegRefs, [], Acc) ->
lists:reverse(Acc);
segment_read_plan([{To, From, Fn} | SegRefs], Indexes, Acc) ->
%% TODO: address unnecessary allocation here
Range = {To, From},
case lists:splitwith(fun (I) ->
ra_range:in(I, Range)
Expand Down Expand Up @@ -345,7 +346,7 @@ get_segment_ext(Dir, Open0, Fn) ->
AbsFn = filename:join(Dir, Fn),
case ra_log_segment:open(AbsFn,
#{mode => read,
access_pattern => sequential})
access_pattern => random})
of
{ok, S} ->
{S, ra_flru:insert(Fn, S, Open0)};
Expand Down

0 comments on commit 9b11ec3

Please sign in to comment.