-
Notifications
You must be signed in to change notification settings - Fork 13.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
KAFKA-2813: selector doesn't close socket connection on non-IOExceptions #501
Conversation
throw e; | ||
} | ||
while ((networkReceive = channel.read()) != null) | ||
addToStagedReceives(channel, networkReceive); |
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.
Should we remove the @throws InvalidReceiveException
in the comments of poll() then?
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.
fixed
Will this change will make another caller of Selector, Sender.run(), to not throw Exceptions any more? (line 130) |
LGTM. @junrao, you can commit after system tests pass on this branch 👍 |
Sender may not get exception from Selector, but can get it from other places. However, it seems that we need to clean up Selectable since it never throws IOException in poll(). Will file a followup jira for that. |
LGTM. |
Patched Selector.poll() to close the connection on any exception. Author: Jun Rao <junrao@gmail.com> Reviewers: Guozhang Wang <wangguoz@gmail.com>, Gwen Shapira <cshapi@gmail.com> Closes #501 from junrao/KAFKA-2813 (cherry picked from commit 3fd168d) Signed-off-by: Jun Rao <junrao@gmail.com>
Patched Selector.poll() to close the connection on any exception. Author: Jun Rao <junrao@gmail.com> Reviewers: Guozhang Wang <wangguoz@gmail.com>, Gwen Shapira <cshapi@gmail.com> Closes #501 from junrao/KAFKA-2813
Patched Selector.poll() to close the connection on any exception.