-
Notifications
You must be signed in to change notification settings - Fork 42
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
Don't raise exceptions from within AMQP callbacks #78
Don't raise exceptions from within AMQP callbacks #78
Conversation
@juliancheal I apologize for opening the 3rd PR on same topic! We had hard time figuring out what was causing file descriptor leakage. Eventually, with kind and fast help from qpid_proton maintainers we discovered that sockets are leaking because we're raising exceptions in callbacks which is not accepted well by the gem 🔥 💥 🎆 😄 I think this PR should actually be fine since we're not monkey-patching anything. Therefore I kindly ask for a review. This time I do not intend to close it after a day or two 👼 |
Raising exceptions from within AMQP callbacks (defained in MessagingHandler) prevents qpid_proton gem from closing TCP connection properly which results in file descriptor leakage (see https://issues.apache.org/jira/browse/PROTON-1791). It's a bug in gem (sockets shouldn't leak no matter what) which will be resolved with next release (qpid_proton 0.22.0) in a month, but with this commit we avoid raising exceptions in callbacks to resolve file descriptor problem immediately. Signed-off-by: Miha Pleško <[email protected]>
a897e9b
to
acf3949
Compare
Checked commit miha-plesko@acf3949 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@miha-plesko LGTM, want me to merge? |
@juliancheal yes please, I'm confident it will work. |
@juliancheal ping |
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.
Slick workaround, lgtm
Let's remember to remove this once the gem is fixed |
Don't raise exceptions from within AMQP callbacks (cherry picked from commit 8317791) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1563361
Gaprindashvili backport details:
|
Raising exceptions from within AMQP callbacks (defined in MessagingHandler) prevents qpid_proton gem from closing TCP connection properly which results in file descriptor leakage (see https://issues.apache.org/jira/browse/PROTON-1791). It's a bug in gem (sockets shouldn't leak no matter what) which will be resolved with next release (qpid_proton 0.22.0) in a month, but with this commit we avoid raising exceptions in callbacks to resolve file descriptor problem immediately.
Replacement for #76
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1554771
@miq-bot assign @juliancheal
@miq-bot add_label enhancement,gaprindashvili/yes
/cc @gberginc