YutSean commented on a change in pull request #3473:
URL: https://github.com/apache/hbase/pull/3473#discussion_r669247097
##########
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:
line 88 & 89 are not changed
--
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]