Huginn-kio opened a new pull request, #8666:
URL: https://github.com/apache/hbase/pull/8666

   ## HBASE-30394
   
   ### Summary
   
   `TinyLfuBlockCache` currently exposes aggregate cache size and entry count 
through
   the data-block-specific `BlockCache` methods. This PR tracks data-block size 
and
   count separately.
   
   See [HBASE-30394](https://issues.apache.org/jira/browse/HBASE-30394).
   
   ### Root cause
   
   `getCurrentDataSize()` delegates to `getCurrentSize()` and
   `getDataBlockCount()` delegates to `getBlockCount()`. Insert and removal 
paths
   do not maintain data-only counters, so index and metadata blocks are 
included.
   
   ### Fix
   
   - Track aligned heap size and count for blocks whose `BlockType` is data.
   - Update both counters on cache insertion, explicit eviction, and listener 
eviction.
   - Return the data-only counters from the existing `BlockCache` methods.
   
   ### Testing
   
   - `git diff --check`
   - `JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home mvn 
-pl hbase-server -am -DskipTests checkstyle:check 
-Dcheckstyle.includes='**/io/hfile/TinyLfuBlockCache.java'`
   - `JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home mvn 
-pl hbase-server -am -DskipTests -Dcheckstyle.skip -Drat.skip -Dspotbugs.skip 
compile`
   - No new regression test was added; this PR contains the focused 
implementation fix.
   
   ### Compatibility
   
   - Public API impact: none; this uses existing `BlockCache` methods.
   - Config impact: none.
   - Persisted and wire format impact: none.
   


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