YutSean commented on a change in pull request #3473: URL: https://github.com/apache/hbase/pull/3473#discussion_r669238774
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java ########## @@ -78,7 +78,13 @@ public Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, // we end up calling l2Cache.getBlock. // We are not in a position to exactly look at LRU cache or BC as BlockType may not be getting // passed always. - return l1Cache.containsBlock(cacheKey)? + boolean existInL1 = l1Cache.containsBlock(cacheKey); + if (!existInL1 && updateCacheMetrics) { + // If the block does not exist in L1, the containsBlock should be counted as one miss. + l1Cache.getStats().miss(false, cacheKey.isPrimary(), cacheKey.getBlockType()); + } + + return existInL1? Review comment: No, the return logic is in 88 & 89 lines. -- 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-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org