Skip to content

HBASE-26083 In branch-2 & branch-1 L1 miss metric is always 0 when using CombinedBlockCache #3473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 && !repeat) {
// If the block does not exist in L1, the containsBlock should be counted as one miss.
l1Cache.getStats().miss(caching, cacheKey.isPrimary(), cacheKey.getBlockType());
}

return existInL1 ?
l1Cache.getBlock(cacheKey, caching, repeat, updateCacheMetrics):
l2Cache.getBlock(cacheKey, caching, repeat, updateCacheMetrics);
}
Expand Down