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

   ## Summary
   
   This PR makes cache admission decisions tier-aware.
   
   Previously, `CachePlacementAdmissionPolicy.shouldAdmit()` made a cache-wide 
admission decision before tier placement was evaluated. This does not work 
correctly for tiered topologies where a block may be rejected by one tier but 
still be admissible to another.
   
   The change separates placement from admission:
   
   - `selectTier()` determines the target cache tier or tiers.
   - `shouldAdmit()` evaluates admission independently for each selected tier.
   - `CacheTier` is now passed to `shouldAdmit()`.
   - `TopologyBackedCacheAccessService` performs placement first and then 
checks admission for each selected tier before insertion.
   
   ## AdaptiveLRU
   
   `AdaptiveLruCachePlacementAdmissionPolicy` previously implemented 
first-level admission by modifying the result of `selectTier()` and removing 
`L1` when a data block was rejected.
   
   With tier-aware admission, this is no longer necessary. AdaptiveLRU now 
preserves the default placement decision and performs adaptive filtering 
through `shouldAdmit()` for `SINGLE` and `L1`. `L2` admission is not affected 
by the AdaptiveLRU first-level admission policy.
   
   For an inclusive topology this means, for example, that a data block may be 
rejected from L1 while still being admitted to L2.
   
   ## Tests
   
   Updated the affected cache policy and topology-backed cache service tests to 
reflect the new ordering and per-tier admission semantics.
   
   The changes cover:
   
   - single-tier admission
   - tiered-exclusive admission
   - tiered-inclusive admission
   - rejection of a selected tier without suppressing placement decisions
   - AdaptiveLRU first-level admission behavior
   
   ## Scope
   
   This PR contains the cache admission API and insertion-flow refactoring only.
   
   The `IndexOnlyLRU` migration that motivated the need for per-tier admission 
is handled separately under HBASE-30362.


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