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

Geoff Anderson commented on KAFKA-2845:
---------------------------------------

[~granthenke] credit to [~nehanarkhede] for pushing for these tests

There seem to be a couple issues at play here:
- If you poke around RequestKeys.scala, KafkaApis.scala, and 
RequestChannel.scala, it seems that neither 0.8.X nor 0.9.X really seems to do 
any version validation on the broker side, and instead sends back the latest 
request response version it knows. 
In the case of the producer test, the producer sends a v1 produce request, the 
broker returns a v0 response, and then the producer tries to parse the response 
as v1, and fails with BufferUnderflowException. Similarly, if the consumer 
issues a v1 fetch request it receives a v0 response from the old broker, 
resulting in a parse error on the client side.

- Protocol.java at least tries to handle this by closing the connection on the 
broker side, but not all requests have been ported to Protocol.java.

- Note that there is a proposal on the table to improve how both brokers and 
clients handle unsupported requests and request versions:
[KIP-35|https://cwiki.apache.org/confluence/display/KAFKA/KIP-35+-+Retrieving+protocol+version]
 - See "Improved handling of unsupported requests on broker"


> Add 0.9 clients vs 0.8 brokers compatibility test
> -------------------------------------------------
>
>                 Key: KAFKA-2845
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2845
>             Project: Kafka
>          Issue Type: Task
>            Reporter: Geoff Anderson
>            Assignee: Geoff Anderson
>
> Add a simple test or two to document and understand what behavior to expect 
> if users try to run 0.9 java producer or 0.9 scala consumer ("old consumer") 
> against an 0.8.X broker cluster



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

Reply via email to