You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Rishabh Daim (Jira)" <ji...@apache.org> on 2026/08/18 16:51:00 UTC
[jira] [Updated] (OAK-12367) SegmentCache: Disable flacky test added for L1 hits should notify L2 (caffeine)
[ https://issues.apache.org/jira/browse/OAK-12367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rishabh Daim updated OAK-12367:
-------------------------------
Fix Version/s: 2.60
(was: 2.2.0)
> SegmentCache: Disable flacky test added for L1 hits should notify L2 (caffeine)
> -------------------------------------------------------------------------------
>
> Key: OAK-12367
> URL: https://issues.apache.org/jira/browse/OAK-12367
> Project: Jackrabbit Oak
> Issue Type: Task
> Reporter: Rishabh Daim
> Assignee: Rishabh Daim
> Priority: Critical
> Fix For: 2.60
>
>
> *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)