Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

junrao
Copy link
Contributor

@junrao junrao commented Nov 12, 2015

Patched Selector.poll() to close the connection on any exception.

throw e;
}
while ((networkReceive = channel.read()) != null)
addToStagedReceives(channel, networkReceive);
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@guozhangwang
Copy link
Contributor

Will this change will make another caller of Selector, Sender.run(), to not throw Exceptions any more? (line 130)

@gwenshap
Copy link
Contributor

LGTM. @junrao, you can commit after system tests pass on this branch 👍

@junrao
Copy link
Contributor Author

junrao commented Nov 12, 2015

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.

@guozhangwang
Copy link
Contributor

LGTM.

@asfgit asfgit closed this in 3fd168d Nov 12, 2015
asfgit pushed a commit that referenced this pull request Nov 12, 2015
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>
junrao referenced this pull request in confluentinc/kafka Nov 18, 2015
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants