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

Jay Kreps commented on KAFKA-1865:
----------------------------------

Actually this approach is fundamentally flawed. This patch waits on the 
completion of all requests in the record accumulator but not any requests that 
have already been sent. To be correct we need to wait on both.

I think the right approach is to keep a set of all the ProduceRequestResults 
that are currently incomplete. We would add to this set as soon as a new batch 
is created and remote it once it is completed. Then flush would just wait on 
all these.

I'll redo this but not tonight.

> Add a flush() call to the new producer API
> ------------------------------------------
>
>                 Key: KAFKA-1865
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1865
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jay Kreps
>            Assignee: Jay Kreps
>         Attachments: KAFKA-1865.patch, KAFKA-1865_2015-02-21_15:36:54.patch
>
>
> The postconditions of this would be that any record enqueued prior to flush() 
> would have completed being sent (either successfully or not).
> An open question is whether you can continue sending new records while this 
> call is executing (on other threads).
> We should only do this if it doesn't add inefficiencies for people who don't 
> use it.



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

Reply via email to