Skip to content

OAK-12425: opt into Caffeine SYNC without metadata changes - #3176

Open
rishabhdaim wants to merge 1 commit into
issue/OAK-12438from
OAK-12425
Open

rishabhdaim wants to merge 1 commit into
issue/OAK-12438from
OAK-12425

Conversation

@rishabhdaim

@rishabhdaim rishabhdaim commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Allow DocumentNodeStore caches, including LOCAL_DIFF, to opt into Caffeine SYNC through disabled-by-default FT_CAFFEINE_CACHE_OAK-12425 or -Doak.documentMK.caffeineCache=true.

Keep the existing persistent wrapper, metadata, raw values, weights and file format. Feature selection is fixed per builder; changes require recreating the builder/store or restarting the service. Optional ASYNC support follows in #3190.

Document the legacy guavaCache property and verify that throwing SYNC eviction listeners do not fail cache operations.

Validation with Java 17: 52 targeted tests passed; all four system-property combinations verified in fresh JVMs; baseline and license checks passed.

OAK-12425. Depends on #3186. Benchmark results.

Co-Authored-By: OpenAI Codex noreply@openai.com

@rishabhdaim

rishabhdaim commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Benchmark re-run after the eviction-listener fix

The results were re-run against a11587c20d, which has the always-registered eviction listener. The benchmark in #3174 now forwards evictions for both policies, the same way DocumentNodeStoreBuilder does. The updated tables (medians of 3 runs, 8 threads) are in the #3174 results comment: #3174 (comment)

Summary:

  • The listener adds no measurable overhead.
  • With the +25% default (320 MB), Caffeine has a higher hit rate in every 2x–10x scenario and 8–34% fewer backend loads.
  • Throughput is higher for steady and concurrent reads up to 5x.
  • Single-thread invalidation and heavy churn remain slower.

@rishabhdaim
rishabhdaim added this pull request to stack #3182 October 3, 2026 11:26
@rishabhdaim
rishabhdaim force-pushed the OAK-12425 branch 2 times, most recently from d3616e1 to be45245 Compare October 5, 2026 08:50

@thomasmueller thomasmueller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a document store team expert needs to review the PR.
Adding the value to the MetadataEntry sounds wrong to me.
Increasing the cache size sounds dangerous (risk of OOME).

Comment thread oak-run/pom.xml Outdated
@rishabhdaim

Copy link
Copy Markdown
Contributor Author

I think a document store team expert needs to review the PR. Adding the value to the MetadataEntry sounds wrong to me. Increasing the cache size sounds dangerous (risk of OOME).

cache size change has been reverted.

@rishabhdaim
rishabhdaim removed this pull request from stack #3182 October 6, 2026 05:37
@rishabhdaim
rishabhdaim changed the base branch from trunk to issue/OAK-12438 October 6, 2026 05:57
@rishabhdaim
rishabhdaim added this pull request to stack #3187 October 6, 2026 05:57
@rishabhdaim
rishabhdaim force-pushed the OAK-12425 branch 2 times, most recently from 816417e to 28eadd0 Compare October 6, 2026 07:05
@rishabhdaim
rishabhdaim removed this pull request from stack #3187 October 6, 2026 08:37
@rishabhdaim
rishabhdaim added this pull request to stack #3191 October 6, 2026 08:37
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@rishabhdaim
rishabhdaim force-pushed the OAK-12425 branch 2 times, most recently from 49616cb to 9d097f9 Compare October 6, 2026 17:41
@rishabhdaim
rishabhdaim force-pushed the OAK-12425 branch 3 times, most recently from 9ae37dd to 9576c56 Compare October 6, 2026 18:58
@rishabhdaim rishabhdaim changed the title OAK-12425 : use caffeine cache by default OAK-12425: opt into Caffeine SYNC without metadata changes Oct 6, 2026
@rishabhdaim
rishabhdaim force-pushed the OAK-12425 branch 2 times, most recently from 4d44309 to 2625d10 Compare October 7, 2026 06:32
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants