-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28211 BucketCache.blocksByHFile may leak on allocationFailure or if we reach io errors tolerated #5530
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
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +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.
To be honest I can not fully understand why the description on jira will lead to code change in this PR... Especially you mentioned we may still fail to cache the entry so the entry in blocksByHFile will be there forever, but then we moved 'blocksByHFile.add' to the very beginning? Why?
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
Show resolved
Hide resolved
} | ||
return Long.compare(a.getOffset(), b.getOffset()); | ||
}); | ||
protected final NavigableSet<BlockCacheKey> blocksByHFile = |
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.
Just change it to package private if we want to access it in test
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
If you look at the original code, we were adding the block here, which is before we have actually cached the block. If we end up getting a BucketAllocatorException, we then never remove the block from blocksByHFile.
We moved it to the |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
1 similar comment
💔 -1 overall
This message was automatically generated. |
OK, two methods... I expanded the code and got the point... |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…r if we reach io errors tolerated
9ab0e5e
to
66f7e82
Compare
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…r if we reach io errors tolerated (#5530) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…r if we reach io errors tolerated (#5530) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…r if we reach io errors tolerated (#5530) Signed-off-by: Duo Zhang <zhangduo@apache.org> Change-Id: I13e726441f6040d8f607335a54118fda2c287191
…r if we reach io errors tolerated (#5530) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…r if we reach io errors tolerated (apache#5530) Signed-off-by: Duo Zhang <zhangduo@apache.org>
…r if we reach io errors tolerated (apache#5530) Signed-off-by: Duo Zhang <zhangduo@apache.org> Change-Id: I63cb18c082777e5d7405238f35dcd2b89059d82f
No description provided.