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

Honghai Chen commented on KAFKA-391:
------------------------------------

Why this fix add this line code?
Sometimes got 2 responses for one request,   Why fall into this situation, will 
there be duplicate data in Kafka?

https://git-wip-us.apache.org/repos/asf?p=kafka.git;a=commitdiff;h=b688c3ba045df340bc32caa40ba1909eddbcbec5
 
+        if (response.status.size != producerRequest.data.size)+          throw 
new KafkaException("Incomplete response (%s) for producer request (%s)"+        
                                   .format(response, producerRequest))



> Producer request and response classes should use maps
> -----------------------------------------------------
>
>                 Key: KAFKA-391
>                 URL: https://issues.apache.org/jira/browse/KAFKA-391
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Joel Koshy
>            Assignee: Joel Koshy
>            Priority: Blocker
>              Labels: optimization
>             Fix For: 0.8.0
>
>         Attachments: KAFKA-391-draft-r1374069.patch, KAFKA-391-v2.patch, 
> KAFKA-391-v3.patch, KAFKA-391-v4.patch
>
>
> Producer response contains two arrays of error codes and offsets - the 
> ordering in these arrays correspond to the flattened ordering of the request 
> arrays.
> It would be better to switch to maps in the request and response as this 
> would make the code clearer and more efficient (right now, linear scans are 
> used in handling producer acks).
> We can probably do the same in the fetch request/response.



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

Reply via email to