[ https://issues.apache.org/jira/browse/OAK-12216 ]
Rishabh Daim deleted comment on OAK-12216:
------------------------------------
was (Author: JIRAUSER299730):
Closed the PR, won't fix this.
> clear Segment cache on successful compaction to prevent W-TinyLFU admission
> freeze for new-generation segments
> --------------------------------------------------------------------------------------------------------------
>
> Key: OAK-12216
> URL: https://issues.apache.org/jira/browse/OAK-12216
> Project: Jackrabbit Oak
> Issue Type: Task
> Reporter: Rishabh Daim
> Assignee: Rishabh Daim
> Priority: Critical
>
> *Segment cache (L2)*: Caffeine W-TinyLFU and Guava LRU only learn about
> accesses that go through _SegmentCache.getSegment()_. Production traffic
> often hits _SegmentId.getSegment()_ and returns the memoized segment from L1
> without touching L2. That made eviction policies act on stale
> frequency/recency while the JVM was still reading “hot” segments from L1 —
> wrong evictions, extra TAR reads, and skewed benchmarks vs reality.
> This was working for Guava, since it was using the LRU eviction policy.
> *Fix*: On every L1 hit, call _SegmentCache.recordHit(SegmentId)_, which
> performs _cache.getIfPresent(id)_ on the backing L2 so policies see real
> usage, plus existing hit accounting.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)