-
Notifications
You must be signed in to change notification settings - Fork 9k
HDFS-17788. [ARR] getFileInfo not handle exception rightly which may cause FileNotFoundException in DistributedFileSystem #7703
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
Hi, @Hexiaoqiao @slfan1989 @KeeProMise . Could you please help review this PR when you have free time? Thanks a lot!!! |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
0a2d3a1
to
adba37e
Compare
Hi @hfutatzhanghb LGTM! wait for the check to be approved. |
…cause FileNotFoundException in DistributedFileSystem.
@KeeProMise , Thanks very much for your reviewing!!! |
💔 -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. |
@KeeProMise have fixed some checkstyle problems. |
🎊 +1 overall
This message was automatically generated. |
Hi @hfutatzhanghb LGTM! Let's wait for two days to see if anyone else has comments. |
@hfutatzhanghb Thanks for the contribution! @KeeProMise Thanks for the review! From my side, it's a +1, but I think it would be best to have @Hexiaoqiao help review this PR. |
@@ -579,6 +579,8 @@ public HdfsFileStatus getFileInfo(String src) throws IOException { | |||
if (e instanceof NoLocationException | |||
|| e instanceof RouterResolveException) { | |||
noLocationException[0] = e; | |||
} else { |
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.
Great catch here. What about other RPCs invoke, if has the same issue? 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.
@Hexiaoqiao , Thanks a lot for your reviewing. Have checked other asyncCatch function invocation, not found the same issue.
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.
Leave one nit comment inline. LGTM from my side. +1. Please check if other RPC invoke involve the same issue. Thanks.
Hi, @Hexiaoqiao . Very nice advice, actually i have checked other asyncCatch function invoke in our production cluster and not found similar issue. |
Thank you for @hfutatzhanghb 's contributions and @slfan1989 @Hexiaoqiao 's review. merged! |
Thank you all !!! |
Description of PR
Refer to HDFS-17788.
When namenode failovers, getFileInfo rpc may return null accidentally which is wrong behavior. We should throw original exception and let client retry.
How was this patch tested?
Add an unit test.