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

Jay Kreps commented on KAFKA-3197:
----------------------------------

Would it be better to treat this more as a bug than a configurable thing in the 
in-flight=1 case? i.e. when would i have in-flight=1 and not want the 
reordering protection? I agree people are depending on that now.

Slightly longer term I think we are actively picking up that 
idempotence/txn/semantics line of work and I think it is possible that whatever 
is done for idempotence might be the more principled solution as it could solve 
this problem even in the presence of pipelining. The idea here is that there is 
a sequence number per-partition which the server uses to dedupe, and this 
ensures that if one request fails all other pipelined requests on that 
partition also fail (and then retry idempotently) so that you don't reorder 
irrespective of the depth of the pipelining.

> 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.9.0.1
>
>
> 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