kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prashanth Menon (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-49) Add acknowledgement to the produce request.
Date Tue, 06 Mar 2012 03:41:01 GMT

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

Prashanth Menon commented on KAFKA-49:

Sounds good to me.  Doing some additional work on DefaultEventHandler, I noticed something
off in the retry logic that I'd like to get confirmed.  Consider the case where I've got data
destined for more than one broker, say three.  
- Enter handleSerializedData()
  - Partioning and collating makes a map with three key/value pairs (broker -> topic partition
data and messages).  
  - Enter for loop
    - Assume the first send works on the first try for broker #1.  
    - Next iteration, the second send to broker #2 fails on the first try, we fall into the
retry loop and recursive into handleSerializedData with requiredRetries = 0.
      - In handleSerializedData
      - This time, the partitioned data will one one key/value pair for the single broker
(broker #2) we're attempting to resend data to.  
      - Enter for loop
        - Attempt to send data to broker #2, the send succeeds
      - We exhaust the map entries and the for loop condition.
    - We return to the retry loop for retry=1 on broker #2 in the catch block.  
    - The previous send succeeded on first try and now there's the "return" statement.  This
exists the function, but we have one more broker (broker #3) to send data to.

Does the flow sound about right?  I think what needs to happen is to set a flag and break
the retry while loop after a successful retry.  Then we check the flag after the loop and
either throw the exception or continue the outer for loop.

Am I crazy?  Am I missing something in my sleep-deprived state here?
> Add acknowledgement to the produce request.
> -------------------------------------------
>                 Key: KAFKA-49
>                 URL: https://issues.apache.org/jira/browse/KAFKA-49
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jun Rao
>            Assignee: Prashanth Menon
> Currently, the produce request doesn't get acknowledged. We need to have a broker send
a response to the producer and have the producer wait for the response before sending the
next request.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message