Skip to content

[core] Avoid retaining rejected cache pages - #9658

Open
yuzelin wants to merge 1 commit into
apache:masterfrom
yuzelin:fix/block-cache-caffeine-rejection
Open

[core] Avoid retaining rejected cache pages#9658
yuzelin wants to merge 1 commit into
apache:masterfrom
yuzelin:fix/block-cache-caffeine-rejection

Conversation

@yuzelin

@yuzelin yuzelin commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Purpose

#8857 changes the default Guava cache to Caffeine cache.

However, Caffeine has a feature, where a newly put value might not be admitted into the cache (see github issue).

In BlockCache, we maintain another variable blocks and it should be synced with Caffeine cache. Due to the above feature, when new value is not admitted, this value will still be kept in blocks and consumes memory. This PR fixes the issue.

This is only a temporary fix. Our goal should be removing the variable blocks and maintain everything in cache.

Tests

  • CacheManagerTest

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.

2 participants