-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-26083 In branch-2 & branch-1 L1 miss metric is always 0 when using CombinedBlockCache #3474
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
Conversation
…ing CombinedBlockCache
@@ -79,7 +79,7 @@ public Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, | |||
boolean repeat, boolean updateCacheMetrics) { | |||
// TODO: is there a hole here, or just awkwardness since in the lruCache getBlock | |||
// we end up calling l2Cache.getBlock. | |||
return lruCache.containsBlock(cacheKey)? | |||
return cacheKey.getBlockType().getCategory() == BlockCategory.DATA? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In CombinedBC, its the NON data block (index/bloom) which goes to onheap LRU cache. Data blocks go to bucket cache (l2Cache as per variable here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Have fixed in the last commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in branch-1 it is also possible that data blocks are cached in L1, so that it is not a good way to check L1 or L2 according to the block type. I have update the logic in the last commit.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
Outdated
Show resolved
Hide resolved
@anoopsjohn any comment about this? |
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
Outdated
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. @anoopsjohn do you have any more comment on this 1 pr?
Approved. I had approved another branch-1 PR also yesterday. Thought that was the one :-). NP all looks good. Pls merge. Nice work |
https://issues.apache.org/jira/browse/HBASE-26083