Return-Path: X-Original-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6205898D2 for ; Tue, 6 Mar 2012 03:41:28 +0000 (UTC) Received: (qmail 63933 invoked by uid 500); 6 Mar 2012 03:41:28 -0000 Delivered-To: apmail-incubator-kafka-dev-archive@incubator.apache.org Received: (qmail 63810 invoked by uid 500); 6 Mar 2012 03:41:27 -0000 Mailing-List: contact kafka-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kafka-dev@incubator.apache.org Delivered-To: mailing list kafka-dev@incubator.apache.org Received: (qmail 63359 invoked by uid 99); 6 Mar 2012 03:41:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 03:41:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 03:41:22 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A66A4A3F9 for ; Tue, 6 Mar 2012 03:41:01 +0000 (UTC) Date: Tue, 6 Mar 2012 03:41:01 +0000 (UTC) From: "Prashanth Menon (Commented) (JIRA)" To: kafka-dev@incubator.apache.org Message-ID: <743312398.25942.1331005261698.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (KAFKA-49) Add acknowledgement to the produce request. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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