-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Log missing file exception when failing to read metadata snapshot #32920
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
|
Pinging @elastic/es-distributed |
dnhatn
left a 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.
@elasticmachine test this please.
|
Yet these two exceptions represent the same failure: a file that is not found? |
|
Maybe there're some slight differences between these two exceptions, according to the java documentation it describes FileNotFoundException as: And for NoSuchFileException it is: "Checked exception thrown when an attempt is made to access a file that does not exist." |
|
@jasontedor anything you want done here? |
ywelsch
left a 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. While logging the exception, we also get info about the file that's missing. Given that this should very rarely happen, I think it's ok having the stack trace.
|
@elasticmachine test this please |
…2920) Adds the exception to the logged output, which contains info about the file that's missing.
There is a logging statement that is able to catch two exception types (FileNotFoundException or NoSuchFileException) but cannot distinguish which type of exception occurred just base on the log message. Maybe adding a stack trace could help.