VladRodionov opened a new pull request, #8501:
URL: https://github.com/apache/hbase/pull/8501

   ### 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:
   
   ```text
   CacheAccessService
     -> CacheTopology
         -> CacheEngine(s)


-- 
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]

Reply via email to