-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17044. Set size of non-exist block to NO_ACK when process FBR or IBR to avoid useless report from DataNode. #5735
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
…block size to NO_ACK
💔 -1 overall
This message was automatically generated. |
@haiyang1987 , Hi, haiyang bro, please correct me if i understand wrongly. Hoping to receive your response, thanks. |
@hfutatzhanghb Hi, bro thanks for your comment. I will add UT try to illustrate this case. |
@haiyang1987 Thanks bro for replying. Got it~ |
Great catch here. One nit comment, just suggest to add some explicit annotations which avoid to useless notification from datanode after delete. And, add new UT will be better here. |
HI @Hexiaoqiao Sir, thanks for your comment. |
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. will +1 and commit to trunk while update comments.Thanks.
@@ -3295,8 +3295,11 @@ private BlockInfo processReportedBlock( | |||
BlockInfo storedBlock = getStoredBlock(block); | |||
if(storedBlock == null) { | |||
// If blocksMap does not contain reported block id, | |||
// the replica should be removed from the data-node. | |||
toInvalidate.add(new Block(block)); | |||
// the replica should be removed from the data-node, |
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.
The replica should be removed from Datanode, and set NumBytes to BlockCommand.No_ACK to avoid useless report to NameNode from Datanode when complete to process it.
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 for the late reply.
Noted, I will update PR today, 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.
Sir, please help reivew it again, Thanks.
💔 -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. |
The failed unit test seems unrelated to the change. |
@Hexiaoqiao Hi Sir, please help review it again when you have time. Thanks a lot~. |
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. +1 from my side. Let's wait two work days if other folks will be give more comments.
Committed to trunk. Thanks @haiyang1987 for your contributions, And thanks @hfutatzhanghb too. |
Thanks @Hexiaoqiao @hfutatzhanghb help review and merge it. |
… IBR to avoid useless report from DataNode. (apache#5735). Contributed by Haiyang Hu. Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
Description of PR
https://issues.apache.org/jira/browse/HDFS-17044
When NameNode processes DataNode increment or full block report, if block is not in the blocks map, it will be added to invalidate and the replica should be removed from the data-node, and the block size should be to set NO_ACK, should be reduce some useless DataNode block reports.