Skip to content

HBASE-30383 Migrate RegionServer block cache ownership to CacheAccessService - #8801

Open
VladRodionov wants to merge 1 commit into
apache:HBASE-30018from
VladRodionov:HBASE-30383-regionserver-cache-access-service
Open

VladRodionov wants to merge 1 commit into
apache:HBASE-30018from
VladRodionov:HBASE-30383-regionserver-cache-access-service

Conversation

@VladRodionov

Copy link
Copy Markdown
Contributor

Summary

This PR continues the BlockCache pluggable architecture work by migrating the remaining HBase callers from the legacy BlockCache API to the new CacheAccessService / CacheEngine abstractions.

The goal is to remove direct dependencies on BlockCache from HBase-facing code while preserving the existing cache behavior and compatibility.

Changes

  • Migrated remaining RegionServer cache callers to CacheAccessService.
  • Updated cache-related RegionServer diagnostics and web UI code.
  • Preserved tier-specific L1/L2 diagnostics through CacheEngine where required.
  • Migrated cache-related tests to use CacheAccessService and CacheEngine.
  • Updated HBaseTestingUtil and HBaseTestingUtility test infrastructure to inject CacheAccessService instead of BlockCache.
  • Updated HeapMemoryManager integration to work with the appropriate resizable cache engine.
  • Migrated tests that previously accessed individual caches through BlockCache#getBlockCaches().
  • Updated fully-cached-file checks to use the aggregate CacheAccessService#getFullyCachedFiles() API.
  • Fixed testPrefetchWhenDataTieringEnabled to re-read the current fully-cached-files state while waiting for asynchronous prefetch completion. TopologyBackedCacheAccessService#getFullyCachedFiles() returns an aggregate snapshot rather than a live backing map.

This change intentionally keeps direct CacheEngine access limited to tests, diagnostics, topology-specific code, and places where per-tier behavior is required. Normal HBase read/write paths use CacheAccessService.

Compatibility

Legacy cache implementations can still participate through the existing BlockCache-to-CacheEngine adapters. This allows the migration to proceed incrementally without requiring all cache implementations to be converted at once.

No user-visible behavior change is intended.

Testing

  • mvn package -DskipTests
  • Cache-related unit tests in hbase-server
  • testPrefetchWhenDataTieringEnabled
  • Existing cache package tests

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