Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7A841200D27 for ; Wed, 11 Oct 2017 06:05:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6FAF3160BE1; Wed, 11 Oct 2017 04:05:08 +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 B38C0160BE0 for ; Wed, 11 Oct 2017 06:05:07 +0200 (CEST) Received: (qmail 40122 invoked by uid 500); 11 Oct 2017 04:05:06 -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 40111 invoked by uid 99); 11 Oct 2017 04:05:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2017 04:05:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 65D96DA39C for ; Wed, 11 Oct 2017 04:05:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id rCldDWDMVznN for ; Wed, 11 Oct 2017 04:05: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 A79FE5F569 for ; Wed, 11 Oct 2017 04:05:04 +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 97A46E06C2 for ; Wed, 11 Oct 2017 04:05: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 2D48525383 for ; Wed, 11 Oct 2017 04:05:02 +0000 (UTC) Date: Wed, 11 Oct 2017 04:05:02 +0000 (UTC) From: "Richard Yu (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-5212) Consumer ListOffsets request can starve group heartbeats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 11 Oct 2017 04:05:08 -0000 [ https://issues.apache.org/jira/browse/KAFKA-5212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16199778#comment-16199778 ] Richard Yu commented on KAFKA-5212: ----------------------------------- During some study after the failure of my most recent commit, there is this approach which one would note: 1. Due to hierarchy design, heartbeat is only accessible by ConsumerCoordinator. 2. In order to pass a variable to Fetcher, ConsumerCoordinator must pass the necessary information through ConsumerNetworkClient. One of the easiest ways to is to define a variable with the time of the next heartbeat (e.g. long nextHeartbeat = now + remainingMs). The variable is defined as a private field of ConsumerNetworkClient but is defined by ConsumerCoordinator's methods. This way, Fetcher could have access to the next heartbeat time. However, this is when we encounter a problem: If fetcher's poll() is concluded (it could not yield, thus we must wait), and if the time.milliseconds() exceeds nextHeartbeat, we must resend a heartbeat. However, the poll() method is currently only accessible in ConsumerCoordinator. Is there a way to get around this? > Consumer ListOffsets request can starve group heartbeats > -------------------------------------------------------- > > Key: KAFKA-5212 > URL: https://issues.apache.org/jira/browse/KAFKA-5212 > Project: Kafka > Issue Type: Bug > Components: consumer > Reporter: Jason Gustafson > Assignee: Richard Yu > Fix For: 1.1.0, 1.0.1 > > > The consumer is not able to send heartbeats while it is awaiting a ListOffsets response. Typically this is not a problem because ListOffsets requests are handled quickly, but in the worst case if the request takes longer than the session timeout, the consumer will fall out of the group. -- This message was sent by Atlassian JIRA (v6.4.14#64029)