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

Rishabh Daim updated OAK-12162:
-------------------------------
    Description: 
Remove all transitional scaffolding and make Caffeine the sole cache 
implementation.

  Changes:
  - AbstractCacheStats — change getCurrentStats() return type from Guava shim 
CacheStats to OakCacheStats; rewrite lastSnapshot field and stats() method to 
use OakCacheStats arithmetic
  - CacheStats — update getCurrentStats() to return OakCacheStats; mark the 
Guava-based constructor @Deprecated(forRemoval = true)
  - OakCacheStatsAdapter — update getCurrentStats() to return OakCacheStats 
directly (drop Guava conversion bridge)
  - RecordCacheStats, SegmentCache.Stats, SegmentCacheStats — update 
getCurrentStats() to return OakCacheStats directly (drop Guava conversion 
bridges added in TASK-11/12)
  - Remove LirsCacheAdapter entirely
  - Remove CacheLIRS (or mark @Deprecated(forRemoval = true) — outright removal 
is acceptable since it was already @Internal)
  - Remove the oak.cache.type toggle from OakCacheBuilder; remove the lirs code 
path; Caffeine is the sole implementation
  - Remove CacheImplementation.LIRS from the enum (or remove the enum entirely)
  - Grep to confirm no module outside oak-core-spi imports 
com.github.benmanes.caffeine.cache or org.apache.jackrabbit.guava.common.cache
  - Remove any Guava cache shim re-exports if still present

  Acceptance criteria:
  - mvn clean install passes (full test suite)
  - AbstractCacheStats.getCurrentStats() returns OakCacheStats; no Guava types 
remain in AbstractCacheStats or its subclasses
  - No CacheLIRS or LirsCacheAdapter classes remain in oak-core-spi
  - OakCacheBuilder has no lirs code path — Caffeine is the sole implementation
  - OSGi integration tests pass

NOTE : This task is optional. Execute only if the decision is made to 
standardise on Caffeine as the sole implementation. If both CacheLIRS and 
Caffeine are kept long-term (with modules using .implementation() to choose 
their backend), this task is skipped and the toggle + both adapters remain 
indefinitely. 

  was:
Complete the migration by removing all transitional scaffolding and making 
Caffeine the sole cache implementation. AbstractCacheStats is decoupled from 
Guava shim types.

  Changes:
  - AbstractCacheStats — change getCurrentStats() return type from Guava shim 
CacheStats to OakCacheStats; rewrite lastSnapshot field and stats() method to 
use OakCacheStats arithmetic
  - CacheStats — update getCurrentStats() to return OakCacheStats; mark 
Guava-based constructor @Deprecated(forRemoval = true)
  - OakCacheStatsAdapter — update getCurrentStats() to return OakCacheStats 
directly (drop Guava conversion bridge)
  - RecordCacheStats, SegmentCache.Stats, SegmentCacheStats — update 
getCurrentStats() to return OakCacheStats directly (drop Guava conversion 
bridges added in TASK-11/12)
  - Remove LirsCacheAdapter entirely
  - Remove CacheLIRS (or mark @Deprecated(forRemoval = true) — outright removal 
acceptable since it was @Internal)
  - Remove oak.cache.type toggle from OakCacheBuilder; remove the lirs code 
path; Caffeine is the sole implementation
  - Grep to confirm no module outside oak-core-spi still imports 
com.github.benmanes.caffeine.cache or org.apache.jackrabbit.guava.common.cache
  - Remove any Guava cache shim re-exports if still present

  Acceptance criteria:
  - mvn clean install passes (full test suite)
  - AbstractCacheStats.getCurrentStats() returns OakCacheStats; no Guava types 
remain in AbstractCacheStats or its subclasses
  - No CacheLIRS or LirsCacheAdapter classes remain in oak-core-spi
  - OakCacheBuilder has no lirs code path — Caffeine is the sole implementation
  - OSGi integration tests pass


> Final cleanup — remove CacheLIRS, LirsCacheAdapter, decouple 
> AbstractCacheStats from Guava
> ------------------------------------------------------------------------------------------
>
>                 Key: OAK-12162
>                 URL: https://issues.apache.org/jira/browse/OAK-12162
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Rishabh Daim
>            Assignee: Rishabh Daim
>            Priority: Major
>
> Remove all transitional scaffolding and make Caffeine the sole cache 
> implementation.
>   Changes:
>   - AbstractCacheStats — change getCurrentStats() return type from Guava shim 
> CacheStats to OakCacheStats; rewrite lastSnapshot field and stats() method to 
> use OakCacheStats arithmetic
>   - CacheStats — update getCurrentStats() to return OakCacheStats; mark the 
> Guava-based constructor @Deprecated(forRemoval = true)
>   - OakCacheStatsAdapter — update getCurrentStats() to return OakCacheStats 
> directly (drop Guava conversion bridge)
>   - RecordCacheStats, SegmentCache.Stats, SegmentCacheStats — update 
> getCurrentStats() to return OakCacheStats directly (drop Guava conversion 
> bridges added in TASK-11/12)
>   - Remove LirsCacheAdapter entirely
>   - Remove CacheLIRS (or mark @Deprecated(forRemoval = true) — outright 
> removal is acceptable since it was already @Internal)
>   - Remove the oak.cache.type toggle from OakCacheBuilder; remove the lirs 
> code path; Caffeine is the sole implementation
>   - Remove CacheImplementation.LIRS from the enum (or remove the enum 
> entirely)
>   - Grep to confirm no module outside oak-core-spi imports 
> com.github.benmanes.caffeine.cache or org.apache.jackrabbit.guava.common.cache
>   - Remove any Guava cache shim re-exports if still present
>   Acceptance criteria:
>   - mvn clean install passes (full test suite)
>   - AbstractCacheStats.getCurrentStats() returns OakCacheStats; no Guava 
> types remain in AbstractCacheStats or its subclasses
>   - No CacheLIRS or LirsCacheAdapter classes remain in oak-core-spi
>   - OakCacheBuilder has no lirs code path — Caffeine is the sole 
> implementation
>   - OSGi integration tests pass
> NOTE : This task is optional. Execute only if the decision is made to 
> standardise on Caffeine as the sole implementation. If both CacheLIRS and 
> Caffeine are kept long-term (with modules using .implementation() to choose 
> their backend), this task is skipped and the toggle + both adapters remain 
> indefinitely. 



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

Reply via email to