Skip to content

HBASE-30025 Wire TieredExclusiveTopology as a CombinedBlockCache-compatible CacheAccessService#8501

Open
VladRodionov wants to merge 1 commit into
apache:HBASE-30018from
VladRodionov:HBASE-30025-tiered-inclusive-topology
Open

HBASE-30025 Wire TieredExclusiveTopology as a CombinedBlockCache-compatible CacheAccessService#8501
VladRodionov wants to merge 1 commit into
apache:HBASE-30018from
VladRodionov:HBASE-30025-tiered-inclusive-topology

Conversation

@VladRodionov

@VladRodionov VladRodionov commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a construction path for creating a topology-backed CacheAccessService
from existing L1 and L2 BlockCache instances.

The pluggable block cache architecture now has the basic components needed for
topology-backed cache access:

  • CacheEngine
  • CacheTopology
  • CachePlacementAdmissionPolicy
  • CacheAccessService
  • TieredExclusiveTopology
  • TopologyBackedCacheAccessService
  • BlockCacheBackedCacheEngine

This PR wires those pieces together for the current CombinedBlockCache-style L1/L2
model. Existing BlockCache instances are adapted to CacheEngine using
BlockCacheBackedCacheEngine, assembled into a TieredExclusiveTopology, and exposed
through TopologyBackedCacheAccessService.

Changes

  • Adds TopologyBackedCacheAccessServices, a small helper class for constructing
    topology-backed cache access services.
  • Adds fromTieredExclusiveBlockCaches(...) for creating a
    TopologyBackedCacheAccessService from existing L1 and L2 BlockCache instances.
  • Adds tests verifying that the constructed service uses:
    • BlockCacheBackedCacheEngine for L1 and L2 adaptation
    • TieredExclusiveTopology
    • the supplied CachePlacementAdmissionPolicy
  • Adds behavior tests for CombinedBlockCache-compatible exclusive tier behavior:
    • L1 hit
    • L2 hit
    • miss
    • L2-to-L1 promotion
    • rejected cache insertion
    • cache insertion into policy-selected tiers
    • eviction from both tiers
    • shutdown propagation

Why this is needed

The current production L1/L2 block cache model is represented by CombinedBlockCache,
typically coordinating LruBlockCache as L1 and BucketCache as L2.

The new architecture models this as:

CacheAccessService
  -> CacheTopology
      -> CacheEngine(s)

AI assistance disclosure

This PR was prepared with assistance from ChatGPT. All changes were reviewed, tested,
and submitted by the author.

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.

1 participant