-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
fix error handling in onBackpressureBuffer #3639
fix error handling in onBackpressureBuffer #3639
Conversation
👍 |
} catch (Throwable e) { | ||
Exceptions.throwIfFatal(e); | ||
manager.terminateAndDrain(e); | ||
// this line not strictly necessary but nice for clarity |
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.
👍
👍 |
try { | ||
onOverflow.call(); | ||
} catch (Throwable e) { | ||
Exceptions.throwIfFatal(e); |
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.
Need to notify the plugin instead of swallowing the non fatal exceptions.
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.
It does not swallow it but emits via L164 to the child subscriber.
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.
yeah. Didn't notice that
👍 |
…or-handling fix error handling in onBackpressureBuffer
onOverflow.call()
was not wrapped in an appropriate try catch to prevent the error from being reported from an upstream operator.This PR includes a unit test that failed on the original code.