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 CDC1A200B92 for ; Wed, 28 Sep 2016 14:51:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CC7B7160AE8; Wed, 28 Sep 2016 12:51:22 +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 1FF7E160AB4 for ; Wed, 28 Sep 2016 14:51:21 +0200 (CEST) Received: (qmail 31898 invoked by uid 500); 28 Sep 2016 12:51:21 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 31725 invoked by uid 99); 28 Sep 2016 12:51:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2016 12:51:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EF0142C2A68 for ; Wed, 28 Sep 2016 12:51:20 +0000 (UTC) Date: Wed, 28 Sep 2016 12:51:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-4702) Kafka consumer must commit offsets asynchronously MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 28 Sep 2016 12:51:23 -0000 [ https://issues.apache.org/jira/browse/FLINK-4702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15529502#comment-15529502 ] ASF GitHub Bot commented on FLINK-4702: --------------------------------------- Github user tzulitai commented on a diff in the pull request: https://github.com/apache/flink/pull/2559#discussion_r80907326 --- Diff: flink-streaming-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka09Fetcher.java --- @@ -285,7 +293,14 @@ public void commitSpecificOffsetsToKafka(Map offsets) if (this.consumer != null) { synchronized (consumerLock) { - this.consumer.commitSync(offsetsToCommit); + if (!commitInProgress) { + commitInProgress = true; + this.consumer.commitAsync(offsetsToCommit, offsetCommitCallback); + } + else { + LOG.warn("Committing previous checkpoint's offsets to Kafka not completed. " + --- End diff -- If the user sets a relatively short checkpoint interval, will this be flooding log? > Kafka consumer must commit offsets asynchronously > ------------------------------------------------- > > Key: FLINK-4702 > URL: https://issues.apache.org/jira/browse/FLINK-4702 > Project: Flink > Issue Type: Bug > Components: Kafka Connector > Affects Versions: 1.1.2 > Reporter: Stephan Ewen > Assignee: Stephan Ewen > Priority: Blocker > Fix For: 1.2.0, 1.1.3 > > > The offset commit calls to Kafka may occasionally take very long. > In that case, the {{notifyCheckpointComplete()}} method blocks for long and the KafkaConsumer cannot make progress and cannot perform checkpoints. > Kafka 0.9+ have methods to commit asynchronously. > We should use those and make sure no more than one commit is concurrently in progress, to that commit requests do not pile up. -- This message was sent by Atlassian JIRA (v6.3.4#6332)