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

Ewen Cheslack-Postava commented on KAFKA-2100:
----------------------------------------------

Option #2 looks good to me as well.

As for when this can happen, the upgrade situation Gwen described is the one 
case I'm aware of as well. Error code changes and changes in semantics of 
various protocol fields are the two ways I can think of where I don't think we 
can provide complete compatibility without introducing extra protocol versions 
that are only semantically (and not structurally) different. There was a 
discussion about this awhile ago (though I can't recall the context now) and I 
think the conclusion was that adding an error code despite it technically being 
incompatible is ok (especially if its a non-retriable error that ultimately has 
the same effect as UNKNOWN). Since that's the case, it's definitely valuable to 
have this information logged.

> Client Error doesn't preserve or display original server error code when it 
> is an unknown code
> ----------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-2100
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2100
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>            Reporter: Gwen Shapira
>            Assignee: David Jacot
>              Labels: newbie
>         Attachments: KAFKA-2100-1.patch
>
>
> When the java client receives an unfamiliar error code, it translates it into 
> UNKNOWN(-1, new UnknownServerException("The server experienced an unexpected 
> error when processing the request"))
> This completely loses the original code, which makes troubleshooting from the 
> client impossible. 
> Will be better to preserve the original code and write it to the log when 
> logging the error.



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

Reply via email to