You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2012/10/24 18:36:12 UTC

[jira] [Commented] (KAFKA-491) KafkaRequestHandler needs to handle exceptions

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

Jun Rao commented on KAFKA-491:
-------------------------------

Thanks for patch v1. Some comments:

1. KafkaApis:
1.1 For StopReplicaRequest, we should send StopReplicaResponse, not LeaderAndIsrResponse.
1.2 Instead of using ErrorMapping.UnknownCode, we should use ErrorMapping.codeFor().
1.3 The logging of the error can be done in one place, not in each type of requests.
1.4 To be consistent with other requests, we probably should remove the global error code in LeaderAndIsrResponse and StopReplicaResponse. We already have an error code for each partition.

2. KafkaRequestHandler: Indent the code in the try/catch clause.
                
> KafkaRequestHandler needs to handle exceptions
> ----------------------------------------------
>
>                 Key: KAFKA-491
>                 URL: https://issues.apache.org/jira/browse/KAFKA-491
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>              Labels: bugs
>             Fix For: 0.8
>
>         Attachments: kafka-491-v1.diff
>
>
> Currently, if apis.handle() throws an exception (e.g., if the broker receives an invalid request), KafkaRequestHandler will die. We need to handle exceptions properly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira