Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed May 24, 2024
1 parent 32b167f commit c88a8d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ra_log.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ truncate_cache(_FromIdx, ToIdx,
#?MODULE{cache = Cache} = State,
Effects) ->
CacheAfter = ra_log_cache:trim(ToIdx, Cache),
ct:pal("cache range after trim ~p", [ra_log_cache:range(CacheAfter)]),
?DEBUG("cache range after trim ~p", [ra_log_cache:range(CacheAfter)]),
{State#?MODULE{cache = CacheAfter}, Effects}.

maybe_append_first_entry(State0 = #?MODULE{last_index = -1}) ->
Expand Down
2 changes: 2 additions & 0 deletions src/ra_log_cache.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ init() ->
reset(#?MODULE{range = undefined} = State) ->
State;
reset(#?MODULE{tbl = Tid,
range = Range,
cache = _Cache} = State) ->
?DEBUG("RA LOG CACHE RESET ~p", [Range]),
true = ets:delete_all_objects(Tid),
State#?MODULE{cache = #{},
range = undefined}.
Expand Down

0 comments on commit c88a8d7

Please sign in to comment.