[
https://issues.apache.org/jira/browse/KAFKA-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15046294#comment-15046294
]
Xing Huang commented on KAFKA-2929:
-----------------------------------
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)