[ 
https://issues.apache.org/jira/browse/HBASE-30453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130544#comment-18130544
 ] 

Hudson commented on HBASE-30453:
--------------------------------

Results for branch branch-3
        [build #631 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/631/]: 
(/) *{color:green}+1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/631/General_20Nightly_20Build_20Report/]








(/) {color:green}+1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/631/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk21 hadoop3 checks{color}
-- For more information [see jdk21 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/631/JDK21_20Nightly_20Build_20Report_20_28Hadoop3_29/]


> BucketCache region cached size is not decremented on eviction for 
> non-persistent IOEngines
> ------------------------------------------------------------------------------------------
>
>                 Key: HBASE-30453
>                 URL: https://issues.apache.org/jira/browse/HBASE-30453
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.6.7
>            Reporter: Julian Chandra Sutadi
>            Assignee: Julian Chandra Sutadi
>            Priority: Major
>              Labels: pull-request-available
>
> HBASE-29707 fixed the issue of region cache % metric going above 100% on two 
> cases:
>  # compacted blocks not being subtracted from the cached block metrics during 
> compaction
>  # caches of archived HFiles accounted for the original region.
> The issue was fixed by making the decrement per block in fileNotFullyCached.
> However, fileNotFullyCached is only called for persistent IOEngines, while 
> the increment runs for every IOEngine:
> {code:java}
> // BucketCache.putIntoBackingMap: increments for every IOEngine
> protected void putIntoBackingMap(BlockCacheKey key, BucketEntry bucketEntry) {
>   BucketEntry previousEntry = backingMap.put(key, bucketEntry);
>   updateRegionCachedSize(key, bucketEntry.getLength());
>   ...
> }
> // BucketCache.blockEvicted: decrements only for persistent IOEngines
> void blockEvicted(BlockCacheKey cacheKey, BucketEntry bucketEntry,
>   boolean decrementBlockNumber, boolean evictedByEvictionProcess) {
>   ...
>   if (decrementBlockNumber) {
>     this.blockNumber.decrement();
>     if (ioEngine.isPersistent()) {
>       fileNotFullyCached(cacheKey, bucketEntry);
>     }
>   }
>   ...
> }
> // BucketCache.fileNotFullyCached: the only decrement
> private void fileNotFullyCached(BlockCacheKey key, BucketEntry entry) {
>   updateRegionCachedSize(key, (entry.getLength() * -1));
>   fullyCachedFiles.remove(key.getHfileName());
> }{code}
> The suggested fix is to move the decrement outside the isPersistent() check, 
> since region accounting is not persistence-specific.
> We will submit the fix proposal soon.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to