From dev-return-104927-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Wed Jun 12 19:58:11 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id D5E8418061A for ; Wed, 12 Jun 2019 21:58:10 +0200 (CEST) Received: (qmail 59936 invoked by uid 500); 12 Jun 2019 19:58:08 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 59925 invoked by uid 99); 12 Jun 2019 19:58:08 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2019 19:58:08 +0000 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 32687E2D7C for ; Wed, 12 Jun 2019 19:58:04 +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 5CBED24643 for ; Wed, 12 Jun 2019 19:58:00 +0000 (UTC) Date: Wed, 12 Jun 2019 19:58:00 +0000 (UTC) From: "Jason Gustafson (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (KAFKA-8484) ProducerId reset can cause IllegalStateException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-8484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Gustafson resolved KAFKA-8484. ------------------------------------ Resolution: Fixed > ProducerId reset can cause IllegalStateException > ------------------------------------------------ > > Key: KAFKA-8484 > URL: https://issues.apache.org/jira/browse/KAFKA-8484 > Project: Kafka > Issue Type: Bug > Reporter: Jason Gustafson > Assignee: Jason Gustafson > Priority: Major > Fix For: 2.3.0 > > > If the producerId is reset while inflight requests are pending, we can get the follow uncaught error. > {code} > [2019-06-03 08:20:45,320] ERROR [Producer clientId=producer-1] Uncaught error in request completion: (org.apache.kafka.clients.NetworkClient) > java.lang.IllegalStateException: Sequence number for partition test_topic-13 is going to become negative : -965 > at org.apache.kafka.clients.producer.internals.TransactionManager.adjustSequencesDueToFailedBatch(TransactionManager.java:561) > at org.apache.kafka.clients.producer.internals.Sender.failBatch(Sender.java:744) > at org.apache.kafka.clients.producer.internals.Sender.failBatch(Sender.java:717) > at org.apache.kafka.clients.producer.internals.Sender.completeBatch(Sender.java:667) > at org.apache.kafka.clients.producer.internals.Sender.handleProduceResponse(Sender.java:574) > at org.apache.kafka.clients.producer.internals.Sender.access$100(Sender.java:75) > at org.apache.kafka.clients.producer.internals.Sender$1.onComplete(Sender.java:818) > at org.apache.kafka.clients.ClientResponse.onComplete(ClientResponse.java:109) > at org.apache.kafka.clients.NetworkClient.completeResponses(NetworkClient.java:561) > at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:553) > at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:335) > at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:253) > at java.lang.Thread.run(Thread.java:748) > {code} > The impact of this is that a failed batch will not be completed until the delivery timeout is exceeded. We are missing validation when we receive a produce response that the producerId and epoch still match. -- This message was sent by Atlassian JIRA (v7.6.3#76005)