You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Xing Huang (JIRA)" <ji...@apache.org> on 2015/12/08 04:46:10 UTC

[jira] [Comment Edited] (KAFKA-2929) Remove duplicate error mapping functionality

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

Xing Huang edited comment on KAFKA-2929 at 12/8/15 3:45 AM:
------------------------------------------------------------

Two days ago, I made a patch to deal with DelayedProduce problem when leader change, and I sent Errors.StaleLeaderEpochCode to client. But the client recognized  it as Errors.NETWORK_EXCEPTION, and threw an exception - "The server disconnected before a response was received.". This exception confused me a lot, then I find a mismatch of the two mappings:  error code 13 means 'stale leader epoch' in ErrorMapping, but 'net work exception' in Errors. So, It is necessary to have a consistent error mapping.


was (Author: peoplebike):
Two days ago, I made a patch to deal with DelayedProduce problem when leader change, and I sent Errors.StaleLeaderEpochCode to client. But the client recognized  it as Errors.NETWORK_EXCEPTION, and threw a exception - "The server disconnected before a response was received.". This exception confused me a lot, then I find a mismatch of the two mappings:  error code 13 means 'stale leader epoch' in ErrorMapping, but 'net work exception' in Errors. So, It is necessary to have a consistent error mapping.

> Remove duplicate error mapping functionality
> --------------------------------------------
>
>                 Key: KAFKA-2929
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2929
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.9.0.0
>            Reporter: Grant Henke
>            Assignee: Grant Henke
>
> Kafka common and core both have a class that maps error codes and exceptions. To prevent errors and issues with consistency we should remove ErrorMapping.scala in core in favor or Errors.java in common. Any duplicated exceptions in core should be removed as well to ensure the mapping is correct.



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