YutSean commented on pull request #3473:
URL: https://github.com/apache/hbase/pull/3473#issuecomment-878785277


   > > 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to