[ 
https://issues.apache.org/jira/browse/KAFKA-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182412#comment-15182412
 ] 

ASF GitHub Bot commented on KAFKA-3341:
---------------------------------------

GitHub user ijuma opened a pull request:

    https://github.com/apache/kafka/pull/1017

    KAFKA-3341: Improve error handling on invalid requests

    * Include request id when parsing of request header fails
    * Don't mute selector on a connection that was closed due to an error 
(otherwise a second exception is thrown)
    * Throw appropriate exception from `ApiKeys.fromId` if invalid id is passed
    
    I ran into the top two issues while trying to figure out why a connection 
from a producer to a broker was failing (and it made things harder than 
necessary). While fixing them, I noticed the third issue.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijuma/kafka 
kafka-3341-improve-error-handling-invalid-requests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/1017.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1017
    
----
commit 4508da56e132b2e9b09fb03b3a1215608b539171
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2016-03-06T16:16:48Z

    Throw more informative exception if wrong id is passed to `ApiKeys.forId`

commit 7530e001e97d34f1d55f217617f99e264d91f119
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2016-03-06T16:20:16Z

    Don't try to mute selector if it has already been closed

commit 0f93c33b29ad77677bf7dda72012f15fc0346ad9
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2016-03-06T23:57:47Z

    Include request id when parsing of request header fails
    
    Similar to what we do when creating the request fails.

----


> Improve error handling on invalid requests
> ------------------------------------------
>
>                 Key: KAFKA-3341
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3341
>             Project: Kafka
>          Issue Type: Bug
>          Components: network
>    Affects Versions: 0.9.0.1
>            Reporter: Ismael Juma
>            Assignee: Ismael Juma
>             Fix For: 0.10.0.0
>
>
> We should include the request id in the error message if parsing of 
> `RequestHeader` fails and we should not try to mute the selector after 
> closing the connection due to an error (as it causes a second exception to be 
> thrown).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to