-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-24529 hbase.rs.evictblocksonclose is not honored when removing … #1881
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@@ -622,7 +622,8 @@ void setDataBlockEncoderInTest(HFileDataBlockEncoder blockEncoder) { | |||
for (HStoreFile storeFile : results) { | |||
if (compactedStoreFiles.contains(storeFile.getPath().getName())) { | |||
LOG.warn("Clearing the compacted storefile {} from {}", storeFile, this); | |||
storeFile.getReader().close(true); | |||
storeFile.getReader().close(storeFile.getCacheConf() != null ? |
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.
While closing the region, doing the evict caused delay in closure. But here are we seeing some impact because of this evict? This will happen in async way from the Discharger thread right? Just trying to understand.
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.
Thank you for reviewing this!
Yes, this will happen in async way from the Discharger thread. So looks like we don't need to change this line. I will revert this change. Thanks.
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.
Checking again.. Sorry my bad. I wanted to add this at other place but ended up here. This is a call happening during region open. So you might want to keep ur change 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.
Oh okay. I missed that, too.. Thank you for pointing it out.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@@ -2741,7 +2741,8 @@ private void removeCompactedfiles(Collection<HStoreFile> compactedfiles) | |||
LOG.trace("Closing and archiving the file {}", file); | |||
// Copy the file size before closing the reader | |||
final long length = r.length(); | |||
r.close(true); | |||
r.close(file.getCacheConf() != null ? |
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.
This area will be getting called when we close a store as well as when the CompactionDischarger finds unreferenced compacted files.. CompactionDischarger is working in an async way anyways. But ya as per ur explanation, during close() we wanted to keep it this was as in patch.
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.
Sorry I was not clear in above comment. My ask was this.
This is called from closeAndArchiveCompactedFiles() and HStore#close().
The former is called in an async way by the Discharger thread anyways. When this area is called by that flow, we can preserve what is there today (Passing true). Close time ya lets honor the config. Sounds ok?
Ideally speaking we should have handled whole these in another way. Within the Cache implementation, the evict by hfile would have been an async impl. So the caller wont get blocked. But ya lets handle that in another jira.
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.
Thank you for the clarification. I understood that. Will change the patch according to your review. Thanks.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…compacted files and closing the storefiles
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…compacted files and closing the storefiles (#1881) Signed-off-by: Anoop Sam John <anoop.hbase@gmail.com>
…compacted files and closing the storefiles (#1881) Signed-off-by: Anoop Sam John <anoop.hbase@gmail.com>
…compacted files and closing the storefiles (apache#1881) Signed-off-by: Anoop Sam John <anoop.hbase@gmail.com>
…compacted files and closing the storefiles (apache#1881) Signed-off-by: Anoop Sam John <anoop.hbase@gmail.com>
…compacted files and closing the storefiles