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

Joel Koshy commented on KAFKA-3197:
-----------------------------------

Hi [~fpj] so your suggestion is to preemptively invoke the retransmission logic 
to retry the affected partitions? It can be done, but I think it would 
necessitate some weird APIs in {{InFlightRequests}} since as Becket notes, we 
would need to also proactively fish out partitions from {{InFlightRequests}} 
and retry those on the new leader.
I’m +1 on the patch apart from the minor comments, but will leave this open for 
a few more days in case anyone has further concerns or better ideas.

> Producer can send message out of order even when in flight request is set to 
> 1.
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-3197
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3197
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, producer 
>    Affects Versions: 0.9.0.0
>            Reporter: Jiangjie Qin
>            Assignee: Jiangjie Qin
>             Fix For: 0.10.0.0
>
>
> The issue we saw is following:
> 1. Producer send message 0 to topic-partition-0 on broker A. The in-flight 
> request to broker A is 1.
> 2. The request is somehow lost
> 3. Producer refreshed its topic metadata and found leader of 
> topic-partition-0 migrated from broker A to broker B.
> 4. Because there is no in-flight request to broker B. All the subsequent 
> messages to topic-partition-0 in the record accumulator are sent to broker B.
> 5. Later on when the request in step (1) times out, message 0 will be retried 
> and sent to broker B. At this point, all the later messages has already been 
> sent, so we have re-order.



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

Reply via email to