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

Rishabh Daim updated OAK-12438:
-------------------------------
    Description: 
h3. Summary
Use the per-cache Caffeine maintenance mode in oak-segment-tar and scope 
FT_OAK-12290 to Segment Tar caches.

h3. Scope
This is the Segment Tar integration of OAK-12436 and has its own dependent PR. 
DocumentNodeStore entry-owned cache metadata belongs to OAK-12425. OAK-12426 
and OAK-12437 cover the subsequent DocumentNodeStore benchmarks.

h3. Acceptance Criteria
# SegmentCache and RecordCache select their own SYNC or ASYNC maintenance 
policy using the shared per-cache API.
# ASYNC remains the default. Disabling FT_OAK-12290 selects SYNC for Segment 
Tar caches only.
# Changing the Segment toggle does not change DocumentNodeStore or independent 
CacheBuilder instances.
# The shared CacheBuilder API no longer uses Segment Tar's toggle as a 
process-wide override after the migration.
# Construction-time sampling, cache recreation, and reapplication of the toggle 
setting are documented.
# Behavioral tests exercise both Segment and Record cache constructors in both 
modes and restore incoming toggle state.
# The PR is based on the per-cache maintenance API PR and is reviewed 
independently from the DocumentNodeStore migration.


  was:
h3. Summary
Store oak-store-document persistent-cache metadata with the exact in-memory 
cache entry it describes.

h3. Context
The async persistent-cache wrapper currently keeps access and 
persistence-origin metadata in a separate map keyed by cache key. A delayed 
eviction callback can race with a replacement entry, and the metadata map can 
retain a strong reference to the cached value. Move this metadata into an 
internal entry wrapper while preserving the existing Cache<K,V> API and 
persistent-cache file format.

h3. Acceptance Criteria
# Access count and persistent-cache-origin state are stored with the 
corresponding in-memory cache entry.
# Eviction handling uses metadata from the exact evicted entry, including when 
callbacks are delayed and the same key is replaced or reinserted.
# Cache<K,V> callers continue to observe raw V values, including through a live 
asMap view.
# Cache weights continue to reflect the cached value, and the persistent 
on-disk format is unchanged.
# Existing behavioral tests for persistence eligibility, invalidation, 
replacement, bulk access, and load/eviction races pass.
# Tests exercise the implementation with both SYNC and ASYNC maintenance modes.


        Summary: Scope Segment Tar Caffeine maintenance overrides to its caches 
 (was: Store cache metadata alongside the corresponding cache entry)

> Scope Segment Tar Caffeine maintenance overrides to its caches
> --------------------------------------------------------------
>
>                 Key: OAK-12438
>                 URL: https://issues.apache.org/jira/browse/OAK-12438
>             Project: Jackrabbit Oak
>          Issue Type: Task
>            Reporter: Rishabh Daim
>            Priority: Major
>
> h3. Summary
> Use the per-cache Caffeine maintenance mode in oak-segment-tar and scope 
> FT_OAK-12290 to Segment Tar caches.
> h3. Scope
> This is the Segment Tar integration of OAK-12436 and has its own dependent 
> PR. DocumentNodeStore entry-owned cache metadata belongs to OAK-12425. 
> OAK-12426 and OAK-12437 cover the subsequent DocumentNodeStore benchmarks.
> h3. Acceptance Criteria
> # SegmentCache and RecordCache select their own SYNC or ASYNC maintenance 
> policy using the shared per-cache API.
> # ASYNC remains the default. Disabling FT_OAK-12290 selects SYNC for Segment 
> Tar caches only.
> # Changing the Segment toggle does not change DocumentNodeStore or 
> independent CacheBuilder instances.
> # The shared CacheBuilder API no longer uses Segment Tar's toggle as a 
> process-wide override after the migration.
> # Construction-time sampling, cache recreation, and reapplication of the 
> toggle setting are documented.
> # Behavioral tests exercise both Segment and Record cache constructors in 
> both modes and restore incoming toggle state.
> # The PR is based on the per-cache maintenance API PR and is reviewed 
> independently from the DocumentNodeStore migration.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to