diff --git a/src/ra_log.erl b/src/ra_log.erl index c217c682..7954c5d4 100644 --- a/src/ra_log.erl +++ b/src/ra_log.erl @@ -1078,7 +1078,9 @@ wal_write_batch(#?MODULE{cfg = #cfg{uid = UId, truncate_cache(_FromIdx, ToIdx, #?MODULE{cache = Cache} = State, Effects) -> - {State#?MODULE{cache = ra_log_cache:trim(ToIdx, Cache)}, Effects}. + CacheAfter = ra_log_cache:trim(ToIdx, Cache), + ct:pal("cache range after trim ~p", [ra_log_cache:range(CacheAfter)]), + {State#?MODULE{cache = CacheAfter}, Effects}. maybe_append_first_entry(State0 = #?MODULE{last_index = -1}) -> State = append({0, 0, undefined}, State0),