Skip to content

Commit

Permalink
uh?
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed Nov 19, 2024
1 parent 9b11ec3 commit 6736a2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ra_log_reader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ segment_read_plan(_RegRefs, [], 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)
end, Indexes) of
case sparse_read_split(fun (I) ->
ra_range:in(I, Range)
end, Indexes, []) of
{[], _} ->
segment_read_plan(SegRefs, Indexes, Acc);
{Idxs, Rem} ->
Expand Down
3 changes: 2 additions & 1 deletion test/ra_log_2_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,10 @@ read_plan(Config) ->
% NumDiv2 = Num div 2,
%% create a list of indexes with some consecutive and some gaps
Indexes = lists:usort(lists:seq(1, Num, 2) ++ lists:seq(1, Num, 5)),
%% make sure that the ETS deletes have been finished before we re-init
%% make sure that the ETS deletes hae been finished before we re-init
gen_server:call(ra_log_ets, ok),
ReadState = ra_log:partial_read(Indexes, Log4),
ct:pal("readStater ~p", [ReadState]),
% Flru0 = ra_flru:new(1, fun ({_, S}) -> ra_log_segment:close(S) end),

{EntriesOut, _} = ra_log:execute_read(ReadState, undefined),
Expand Down

0 comments on commit 6736a2d

Please sign in to comment.