Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Closed segments leak memory as eviction does not remove these segments from closed segments list.
void evictCache(long[] followerIndices, long flushedIndex, long lastAppliedIndex) { List<LogSegment> toEvict = evictionPolicy.evict(followerIndices, flushedIndex, lastAppliedIndex, closedSegments, maxCachedSegments); for (LogSegment s : toEvict) { s.evictCache(); }
After the segments have been marked for eviction, they should be removed from queue as well.