Skip to content

[core] Support off-heap lookup cache - #8867

Merged
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:codex/support-offheap-cache
Jul 28, 2026
Merged

[core] Support off-heap lookup cache#8867
JingsongLi merged 1 commit into
apache:masterfrom
JingsongLi:codex/support-offheap-cache

Conversation

@JingsongLi

Copy link
Copy Markdown
Contributor

What changed

  • Add an off-heap mode to CacheManager.
  • Copy loaded cache pages into off-heap MemorySegments.
  • Make CacheManager closeable so invalidating the caches releases retained segments.

Why

Local lookup users backed by managed memory need the block cache to reside outside the JVM heap. The existing cache always wrapped heap byte arrays and had no explicit lifecycle hook.

Validation

  • mvn -q -pl paimon-common -Pfast-build -DwildcardSuites=none -Dtest=CacheManagerTest test
  • mvn -q -pl paimon-common spotless:check -DskipTests
  • mvn -q -pl paimon-common -DskipTests compile

@JingsongLi
JingsongLi marked this pull request as ready for review July 27, 2026 16:25

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. The off-heap copy path, shared data/index cache close path, and lifecycle behavior are sound. CacheManagerTest passes locally.

@JingsongLi
JingsongLi merged commit 881e924 into apache:master Jul 28, 2026
12 of 13 checks passed
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