You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/07/13 04:35:40 UTC

[GitHub] [hbase] anoopsjohn edited a comment on pull request #3473: HBASE-26083 In branch-2 & branch-1 L1 miss metric is always 0 when using CombinedBlockCache

anoopsjohn edited a comment on pull request #3473:
URL: https://github.com/apache/hbase/pull/3473#issuecomment-878772448


   >In the master branch, in ComebinedBlockCache getBlock method, it will check if the block is metablock or not and check it in L1 or L2. This will make the metric work normal.
   
   There is one thing to note
   In master branch also we have,
   
   >
   public Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat,
         boolean updateCacheMetrics, BlockType blockType) {
       if (blockType == null) {
         return getBlock(cacheKey, caching, repeat, updateCacheMetrics);
       }
       boolean metaBlock = isMetaBlock(blockType);
       if (metaBlock) {
         return l1Cache.getBlock(cacheKey, caching, repeat, updateCacheMetrics);
       } else {
         return l2Cache.getBlock(cacheKey, caching, repeat, updateCacheMetrics);
       }
     }
   >
   
   In some code paths, we dont pass a blockType.  It will come as null. That time we follow the old method of check for key in cache and call get.
   For those flow, the type in BlockCacheKey  will also be null.  We may have to consider that.
   
   So we can think about another way around?  Can we think about containsBlock() deal with metric too?  Need to be careful though.  Even in master, the metric what we get is not accurate. It may be better than 0% miss rate. But not correct


-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org