-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-5745] set an uncaught exception handler for netty threads #3293
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
|
Should we instead of copying the uncaught exception handler code move it out to an outer class? You would have to base this PR on #3290, move the class out and only use it here. |
|
would be a different LOG handler though - does it make sense to have two or is it enough to have a single one in an outer class? |
|
I think it's logged as |
|
wouldn't it be I'm just asking - don't know whether it is a valid use case to have the two or if it's good enough to have one only... |
|
I thought that this is only going to be one, sorry. Imo only one is good. The thread name is logged in the message. |
|
Looking at this and at my previous pull request, I am wondering if we should actually define and collect exit codes somewhere globally, like in |
|
I was actually looking through the code to find something like this but it seems that every class does this locally for now. Global exit codes make sense though - also for documentation |
Make it a top-level class so that it can be re-used.
This sets a JVM-terminating handler that logs errors from uncaught exceptions and terminates the process so that critical exceptions are not accidentally lost and leave the system running in an inconsistent state. extend
|
#3290 is in |
|
@NicoK I think you can update this now... |
|
@StephanEwen already did when #3290 got in |
|
This looks good to me now. Nico moved the |
|
+1 to merge this |
This adds a JVM-terminating handler that logs errors from uncaught exceptions
and terminates the process so that critical exceptions are not accidentally
lost and leave the system running in an inconsistent state.
It borrows and re-uses code from @StephanEwen from this PR:
#3290