From jira-return-9188-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Mon Jan 29 10:58:09 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 74CDE180654 for ; Mon, 29 Jan 2018 10:58:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6538B160C3F; Mon, 29 Jan 2018 09:58:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AC4B3160C31 for ; Mon, 29 Jan 2018 10:58:08 +0100 (CET) Received: (qmail 92436 invoked by uid 500); 29 Jan 2018 09:58:07 -0000 Mailing-List: contact jira-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@kafka.apache.org Delivered-To: mailing list jira@kafka.apache.org Received: (qmail 92425 invoked by uid 99); 29 Jan 2018 09:58:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2018 09:58:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0A58C1A29AF for ; Mon, 29 Jan 2018 09:58:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id csBE_3YT56iA for ; Mon, 29 Jan 2018 09:58:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EAF115F3A1 for ; Mon, 29 Jan 2018 09:58:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7A57FE0144 for ; Mon, 29 Jan 2018 09:58:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C7B67240FA for ; Mon, 29 Jan 2018 09:58:00 +0000 (UTC) Date: Mon, 29 Jan 2018 09:58:00 +0000 (UTC) From: "Yu LIU (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-6446) KafkaProducer with transactionId endless waits when bootstrap server is down MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-6446?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1634= 3150#comment-16343150 ]=20 Yu LIU commented on KAFKA-6446: ------------------------------- Hello, I have a look at this and it appears that TRANSACTION_TIMEOUT_CONFIG is def= ined as the time to wait when *a producer tries to get the producer id from= transaction coordinator by specifying transaction id*, more concretely it'= s for [InitProducerIdRequest|https://github.com/apache/kafka/blob/trunk/cli= ents/src/main/java/org/apache/kafka/common/requests/InitProducerIdRequest.j= ava]. But where we hang here is before InitProducerIdRequest, we need to find the= transaction coordinator by sending a [FindCoordinatorRequest|https://githu= b.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common= /requests/FindCoordinatorRequest.java], for this phase we didn't treat time= out case so it leads to the [Sender thread endless retrying to send FindCoo= rdinatorRequest|https://github.com/apache/kafka/blob/trunk/clients/src/main= /java/org/apache/kafka/clients/producer/internals/Sender.java#L161-L167]. So I think anyway the producer shoud not be stuck in initTransactions() whe= n it can't connect to the kafka cluster ? We should to define a new TIMEOUT= for connecting to the cluster (FindCoordinatorRequest) or applying the TRA= NSACTION_TIMEOUT_CONFIG to it directly ? > KafkaProducer with transactionId endless waits when bootstrap server is d= own > -------------------------------------------------------------------------= --- > > Key: KAFKA-6446 > URL: https://issues.apache.org/jira/browse/KAFKA-6446 > Project: Kafka > Issue Type: Bug > Components: clients, producer=20 > Affects Versions: 0.11.0.0, 1.0.0 > Reporter: Eduardo Sciullo > Priority: Critical > Attachments: Test.java > > > When bootstrap server is down, a=C2=A0KafkaProducer=C2=A0with transaction= Id endless waits on=C2=A0initTransactions.=C2=A0 > The timeouts don't apply to that operation: don't=C2=A0honor the=C2=A0{{T= RANSACTION_TIMEOUT_CONFIG.}} > Attached an example of my code to reproduce the scenario. > =C2=A0 > I opened this issue as suggested by=C2=A0[Gary Russell|https://stackoverf= low.com/users/1240763/gary-russell] > [https://stackoverflow.com/questions/48226546/defaultkafkaproducerfactory= -with-transactionidprefix-endless-waits-when-bootstra] > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)