-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17297. The NameNode should remove block from the BlocksMap if the block is marked as deleted #6369
Conversation
…e block is marked as deleted
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Hi @ayushtkn @Hexiaoqiao @ZanderXu @zhangshuyan0 @tomscut Could you please help me review this pr when you have free time ? Thank you very much. |
Hi @tasanuma Could you please help me review this pr when you have free time ? Thank you very much. |
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.
LGTM
Merged. Thanks for fixing the issue, @haiyang1987. Thanks for your review, @ZanderXu. |
Cherry-picked to branch-3.3. |
…e block is marked as deleted (apache#6369) Reviewed-by: ZanderXu <zanderxu@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
Description of PR
https://issues.apache.org/jira/browse/HDFS-17297
When call internalReleaseLease method:
if the condition
uc.getNumExpectedLocations() < minLocationsNum && lastBlock.getNumBytes() == 0
is met during the execution of UNDER_RECOVERY logic, the block is removed from the block list in the inode file and marked as deleted.However it is not removed from the BlocksMap, it may cause memory leak.
Therefore it is necessary to remove the block from the BlocksMap at this point as well.