[
https://issues.apache.org/jira/browse/OAK-12425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rishabh Daim updated OAK-12425:
-------------------------------
Description:
oak-store-document uses CacheLIRS as its internal cache.
Now since we are moving forward with caffeine cache, we need to make caffeine
as default cache for oak-store-document bundle as well.
However, there is one concern here i.e. maintainence. CacheLIRS does
maintainence in sync mode whereas caffeine does it in async mode and we must
consider this while moving ahead with caffeine.
h3. Metadata correctness and dependencies
Store access and persistence-origin metadata with each in-memory cache entry.
Remove the separate value-retaining metadata map, preserving raw Cache<K,V> and
live map behavior, weights, statistics and the persistent file format. Validate
delayed eviction, replacement/reinsertion, bulk lookup, loading, broadcast and
invalidation under both SYNC and ASYNC. Per-cache mode selection is provided by
OAK-12436. Segment Tar integration is a separate OAK-12438 PR.
h3. Configuration and behavioral acceptance criteria
# DocumentNodeStoreBuilder supports an independent maintenance mode per
CacheType; unconfigured caches default to SYNC. A bundle-owned override is
applied through this per-cache API, without changing other bundles' caches.
# Entry-owned access and persistence-origin metadata replace the separate
metadata map. Metadata is released with its entry and a delayed eviction
callback refers to that exact entry, including same-object reinsertion.
# Preserve the raw Cache<K,V> API and live asMap behavior for putIfAbsent,
replace, conditional remove, compute, iterator removal and clear. Include entry
memory overhead in weighing while serializing only the original value.
# Validate used/unused entries, persistent origin, bulk hits/misses, null and
failed loaders, eviction before a loader returns, replacement, delayed
callbacks, broadcasts, explicit invalidation and queued-write ordering under
both maintenance modes.
# Update tests coupled to the removed metadata implementation and remove only
obsolete implementation-specific tests. Retain behavioral assertions and add
regression coverage for the new entry design.
# Deliver this PR above OAK-12438 in the gh stack. Finish the full planned
implementation before the final reviews; validate with java17.
h3. Bundle default
Oak Store Document selects SYNC maintenance by default, with explicit per-cache
ASYNC overrides. The shared CacheBuilder API remains ASYNC by default. Caller
configuration belongs in this PR, not OAK-12436 / PR 3185.
was:
oak-store-document uses CacheLIRS as its internal cache.
Now since we are moving forward with caffeine cache, we need to make caffeine
as default cache for oak-store-document bundle as well.
However, there is one concern here i.e. maintainence. CacheLIRS does
maintainence in sync mode whereas caffeine does it in async mode and we must
consider this while moving ahead with caffeine.
h3. Metadata correctness and dependencies
Store access and persistence-origin metadata with each in-memory cache entry.
Remove the separate value-retaining metadata map, preserving raw Cache<K,V> and
live map behavior, weights, statistics and the persistent file format. Validate
delayed eviction, replacement/reinsertion, bulk lookup, loading, broadcast and
invalidation under both SYNC and ASYNC. Per-cache mode selection is provided by
OAK-12436. Segment Tar integration is a separate OAK-12438 PR.
h3. Configuration and behavioral acceptance criteria
# DocumentNodeStoreBuilder supports an independent maintenance mode per
CacheType; unconfigured caches default to ASYNC. A bundle-owned override is
applied through this per-cache API, without changing other bundles' caches.
# Entry-owned access and persistence-origin metadata replace the separate
metadata map. Metadata is released with its entry and a delayed eviction
callback refers to that exact entry, including same-object reinsertion.
# Preserve the raw Cache<K,V> API and live asMap behavior for putIfAbsent,
replace, conditional remove, compute, iterator removal and clear. Include entry
memory overhead in weighing while serializing only the original value.
# Validate used/unused entries, persistent origin, bulk hits/misses, null and
failed loaders, eviction before a loader returns, replacement, delayed
callbacks, broadcasts, explicit invalidation and queued-write ordering under
both maintenance modes.
# Update tests coupled to the removed metadata implementation and remove only
obsolete implementation-specific tests. Retain behavioral assertions and add
regression coverage for the new entry design.
# Deliver this PR above OAK-12438 in the gh stack. Finish the full planned
implementation before the final reviews; validate with java17.
> oak-store-document should use caffeine by default instead of cachelirs
> ----------------------------------------------------------------------
>
> Key: OAK-12425
> URL: https://issues.apache.org/jira/browse/OAK-12425
> Project: Jackrabbit Oak
> Issue Type: Technical task
> Reporter: Rishabh Daim
> Assignee: Rishabh Daim
> Priority: Major
>
> oak-store-document uses CacheLIRS as its internal cache.
> Now since we are moving forward with caffeine cache, we need to make caffeine
> as default cache for oak-store-document bundle as well.
> However, there is one concern here i.e. maintainence. CacheLIRS does
> maintainence in sync mode whereas caffeine does it in async mode and we must
> consider this while moving ahead with caffeine.
> h3. Metadata correctness and dependencies
> Store access and persistence-origin metadata with each in-memory cache entry.
> Remove the separate value-retaining metadata map, preserving raw Cache<K,V>
> and live map behavior, weights, statistics and the persistent file format.
> Validate delayed eviction, replacement/reinsertion, bulk lookup, loading,
> broadcast and invalidation under both SYNC and ASYNC. Per-cache mode
> selection is provided by OAK-12436. Segment Tar integration is a separate
> OAK-12438 PR.
> h3. Configuration and behavioral acceptance criteria
> # DocumentNodeStoreBuilder supports an independent maintenance mode per
> CacheType; unconfigured caches default to SYNC. A bundle-owned override is
> applied through this per-cache API, without changing other bundles' caches.
> # Entry-owned access and persistence-origin metadata replace the separate
> metadata map. Metadata is released with its entry and a delayed eviction
> callback refers to that exact entry, including same-object reinsertion.
> # Preserve the raw Cache<K,V> API and live asMap behavior for putIfAbsent,
> replace, conditional remove, compute, iterator removal and clear. Include
> entry memory overhead in weighing while serializing only the original value.
> # Validate used/unused entries, persistent origin, bulk hits/misses, null and
> failed loaders, eviction before a loader returns, replacement, delayed
> callbacks, broadcasts, explicit invalidation and queued-write ordering under
> both maintenance modes.
> # Update tests coupled to the removed metadata implementation and remove only
> obsolete implementation-specific tests. Retain behavioral assertions and add
> regression coverage for the new entry design.
> # Deliver this PR above OAK-12438 in the gh stack. Finish the full planned
> implementation before the final reviews; validate with java17.
> h3. Bundle default
> Oak Store Document selects SYNC maintenance by default, with explicit
> per-cache ASYNC overrides. The shared CacheBuilder API remains ASYNC by
> default. Caller configuration belongs in this PR, not OAK-12436 / PR 3185.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)