-
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-14529. SetTimes to throw FileNotFoundException if inode is not found #3243
Conversation
…ound. Change-Id: I6715b158b5ae3f198178d52cab9645a7b696fe1c
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.
Nice catch!
Moving the null check inside the unprotected
call should mitigate NPE from other call paths.
Pending CI.
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.
Thanx @jojochuang for the change, makes sense to change it to FNF.
But we should try to eliminate the root cause as well in the future if possible. From the jira discussion, I think you have found the root cause as well.
+1
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.
Left a minor nit, +1 (non-binding) otherwise
@@ -497,10 +492,14 @@ private static void setDirStoragePolicy( | |||
|
|||
static boolean unprotectedSetTimes( | |||
FSDirectory fsd, INodesInPath iip, long mtime, long atime, boolean force) | |||
throws QuotaExceededException { | |||
throws QuotaExceededException, FileNotFoundException { |
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.
nit: looks like throwing QuotaExceededException
is redundant here
Change-Id: I816a25b208bcb8c9605c68a1dd7deaee34e221d6
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Change-Id: I6a46aef7cf9ce81d1aebd1072fd45bb75cced3bb
🎊 +1 overall
This message was automatically generated. |
Thanks for the review. This is merged now. |
…ound (apache#3243) Reviewed-by: Akira Ajisaka <aajisaka@apache.org> Reviewed-by: Viraj Jasani <vjasani@apache.org> Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
Throw FileNotFoundException instead of NPE if inode is not found.
As explained in the corresponding jira, there are two possibilities for this to happen. This PR does not resolve the culprit. I just merely make the exception more graceful.
If this problem is ever hit during edit log loading, NameNode can work around by applying the -recover option.