[ 
https://issues.apache.org/jira/browse/OAK-12216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rishabh Daim reopened OAK-12216:
--------------------------------

> 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)

Reply via email to