From jira-return-10761-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Thu Mar 15 01:45:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D4C1618067B for ; Thu, 15 Mar 2018 01:45:03 +0100 (CET) Received: (qmail 66548 invoked by uid 500); 15 Mar 2018 00:45:02 -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 66537 invoked by uid 99); 15 Mar 2018 00:45:02 -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; Thu, 15 Mar 2018 00:45:02 +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 71A3CC0D0B for ; Thu, 15 Mar 2018 00:45:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, 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 56Ck7cRJmQF2 for ; Thu, 15 Mar 2018 00:45:01 +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 6BB175F2ED for ; Thu, 15 Mar 2018 00:45:01 +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 C4C7BE0114 for ; Thu, 15 Mar 2018 00:45:00 +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 406ED21490 for ; Thu, 15 Mar 2018 00:45:00 +0000 (UTC) Date: Thu, 15 Mar 2018 00:45:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-6661) Sink connectors that explicitly 'resume' topic partitions can resume a paused task 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-6661?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1639= 9681#comment-16399681 ]=20 ASF GitHub Bot commented on KAFKA-6661: --------------------------------------- rhauch opened a new pull request #4716: KAFKA-6661: Ensure sink connectors = don=E2=80=99t resume consumer when task is paused URL: https://github.com/apache/kafka/pull/4716 =20 =20 Changed WorkerSinkTaskContext to only resume the consumer topic partitio= ns when the connector/task is not in the paused state. =20 The context tracks the set of topic partitions that are explicitly pause= d/resumed by the connector, and when the WorkerSinkTask resumes the tasks i= t currently resumes all topic partitions *except* those that are still expl= icitly paused in the context. Therefore, the change above should result in = the desired behavior. =20 Several debug statements were added to record when the context is called= by the connector. =20 This can be backported to older releases, since this bug goes back to 0.= 10 or 0.9. =20 ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation=20 - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) =20 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > Sink connectors that explicitly 'resume' topic partitions can resume a pa= used task > -------------------------------------------------------------------------= --------- > > Key: KAFKA-6661 > URL: https://issues.apache.org/jira/browse/KAFKA-6661 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Affects Versions: 0.9.0.0, 0.10.0.0, 0.11.0.0, 1.0.0 > Reporter: Randall Hauch > Assignee: Randall Hauch > Priority: Critical > > Sink connectors are allowed to use the {{SinkTaskContext}}'s methods to e= xplicitly pause and resume topic partitions. This is useful when connectors= need additional time processing the records for specific topic partitions = (e.g., the external system has an outage). > However, when the sink connector has been paused via the REST API, the wo= rker for the sink tasks pause the consumer. When the connector is polled, t= he poll request might timeout and return no records. Connect then calls the= task's {{put(...)}} method (with no records), and this allows the task to = optionally call any of the {{SinkTaskContext}}'s pause or resume methods. I= f it calls resume, this will unexpectedly resume the paused consumer, causi= ng the consumer to return messages and the connector to process those messa= ges -- despite the connector still being paused. > This is reported against 1.0, but the affected code has not been changed = since at least 0.9.0.0. > A workaround is to remove rather than pause a connector. It's inconvenien= t, but it works. -- This message was sent by Atlassian JIRA (v7.6.3#76005)