VladRodionov opened a new pull request, #8766:
URL: https://github.com/apache/hbase/pull/8766
## Summary
Migrates the native CacheAccessService path for AdaptiveLRU from
`LruAdaptiveBlockCache` to `LruCacheEngine` plus a dedicated adaptive
placement/admission policy.
The legacy `BlockCache` construction path remains unchanged.
## Changes
- Add `AdaptiveLruCachePlacementAdmissionPolicy`.
- Move AdaptiveLRU admission state and adjustment logic into the policy.
- Add eviction-pressure feedback to `CacheEvictionListener`.
- Add a default eviction-pressure callback to
`CachePlacementAdmissionPolicy`.
- Have `LruCacheEngine` report requested eviction pressure (`bytesToFree`).
- Have `TopologyBackedCacheAccessService` route:
- concrete block evictions to `CacheTopology`;
- eviction-pressure feedback to `CachePlacementAdmissionPolicy`.
- Use native `LruCacheEngine` for AdaptiveLRU in the CacheAccessService path.
- Preserve `LruAdaptiveBlockCache` for the legacy `BlockCacheFactory`
construction path.
## AdaptiveLRU behavior
The adaptive algorithm preserves the behavior of the legacy
`LruAdaptiveBlockCache`, including:
- the existing AdaptiveLRU configuration properties;
- the approximately 10-second evaluation window;
- requested eviction pressure rather than actual bytes freed;
- heavy-eviction count threshold;
- adaptive data-block admission percentage;
- deterministic block-offset filtering;
- recovery when eviction pressure decreases.
For tiered caches, AdaptiveLRU controls L1 admission only. It does not
globally reject a block that can still be placed in L2.
## Tests
Adds coverage for:
- AdaptiveLRU admission adjustment and recovery;
- single-tier data-block admission;
- inclusive and exclusive tier placement;
- eviction-pressure reporting by `LruCacheEngine`;
- eviction-pressure routing through `TopologyBackedCacheAccessService`;
- native AdaptiveLRU CacheAccessService construction;
- preservation of the legacy `LruAdaptiveBlockCache` construction path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]