Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B53CA18D1A for ; Mon, 4 Jan 2016 23:06:40 +0000 (UTC) Received: (qmail 89273 invoked by uid 500); 4 Jan 2016 23:06:40 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 89176 invoked by uid 500); 4 Jan 2016 23:06:40 -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 89149 invoked by uid 99); 4 Jan 2016 23:06:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2016 23:06:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EFFCA2C1F5A for ; Mon, 4 Jan 2016 23:06:39 +0000 (UTC) Date: Mon, 4 Jan 2016 23:06:39 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-2937) Topics marked for delete in Zookeeper may become undeletable 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-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081958#comment-15081958 ] ASF GitHub Bot commented on KAFKA-2937: --------------------------------------- GitHub user MayureshGharat opened a pull request: https://github.com/apache/kafka/pull/729 KAFKA-2937 : Disable the leaderIsr check if the topic is to be deleted. The check was implemented in KAFKA-340 : If we are shutting down a broker when the ISR of a partition includes only that broker, we could lose some messages that have been previously committed. For clean shutdown, we need to guarantee that there is at least 1 other broker in ISR after the broker is shut down. When we are deleting the topic, this check can be avoided. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MayureshGharat/kafka kafka-2937 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/729.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #729 ---- commit 9d5afd0f29f2f4311e534eb375e1c9ddb23b33dd Author: Mayuresh Gharat Date: 2016-01-04T22:56:01Z Disable the leaderIsr check if the topic is to be deleted. ---- > Topics marked for delete in Zookeeper may become undeletable > ------------------------------------------------------------ > > Key: KAFKA-2937 > URL: https://issues.apache.org/jira/browse/KAFKA-2937 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.9.0.0 > Reporter: Rajini Sivaram > Assignee: Mayuresh Gharat > > In our clusters, we occasionally see topics marked for delete, but never actually deleted. It may be due to brokers being restarted while tests were running, but further restarts of Kafka dont fix the problem. The topics remain marked for delete in Zookeeper. > Topic describe shows: > {quote} > Topic:testtopic PartitionCount:1 ReplicationFactor:3 Configs: > Topic: testtopic Partition: 0 Leader: none Replicas: 3,4,0 Isr: > {quote} > Kafka logs show: > {quote} > 2015-12-02 15:53:30,152] ERROR Controller 2 epoch 213 initiated state change of replica 3 for partition [testtopic,0] from OnlineReplica to OfflineReplica failed (state.change.logger) > kafka.common.StateChangeFailedException: Failed to change state of replica 3 for partition [testtopic,0] since the leader and isr path in zookeeper is empty > at kafka.controller.ReplicaStateMachine.handleStateChange(ReplicaStateMachine.scala:269) > at kafka.controller.ReplicaStateMachine$$anonfun$handleStateChanges$2.apply(ReplicaStateMachine.scala:114) > at kafka.controller.ReplicaStateMachine$$anonfun$handleStateChanges$2.apply(ReplicaStateMachine.scala:114) > at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:322) > at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:978) > at kafka.controller.ReplicaStateMachine.handleStateChanges(ReplicaStateMachine.scala:114) > at kafka.controller.TopicDeletionManager$$anonfun$startReplicaDeletion$2.apply(TopicDeletionManager.scala:342) > at kafka.controller.TopicDeletionManager$$anonfun$startReplicaDeletion$2.apply(TopicDeletionManager.scala:334) > at scala.collection.immutable.Map$Map1.foreach(Map.scala:116) > at kafka.controller.TopicDeletionManager.startReplicaDeletion(TopicDeletionManager.scala:334) > at kafka.controller.TopicDeletionManager.kafka$controller$TopicDeletionManager$$onPartitionDeletion(TopicDeletionManager.scala:367) > at kafka.controller.TopicDeletionManager$$anonfun$kafka$controller$TopicDeletionManager$$onTopicDeletion$2.apply(TopicDeletionManager.scala:313) > at kafka.controller.TopicDeletionManager$$anonfun$kafka$controller$TopicDeletionManager$$onTopicDeletion$2.apply(TopicDeletionManager.scala:312) > at scala.collection.immutable.Set$Set1.foreach(Set.scala:79) > at kafka.controller.TopicDeletionManager.kafka$controller$TopicDeletionManager$$onTopicDeletion(TopicDeletionManager.scala:312) > at kafka.controller.TopicDeletionManager$DeleteTopicsThread$$anonfun$doWork$1$$anonfun$apply$mcV$sp$4.apply(TopicDeletionManager.scala:431) > at kafka.controller.TopicDeletionManager$DeleteTopicsThread$$anonfun$doWork$1$$anonfun$apply$mcV$sp$4.apply(TopicDeletionManager.scala:403) > at scala.collection.immutable.Set$Set2.foreach(Set.scala:111) > at kafka.controller.TopicDeletionManager$DeleteTopicsThread$$anonfun$doWork$1.apply$mcV$sp(TopicDeletionManager.scala:403) > at kafka.controller.TopicDeletionManager$DeleteTopicsThread$$anonfun$doWork$1.apply(TopicDeletionManager.scala:397) > at kafka.controller.TopicDeletionManager$DeleteTopicsThread$$anonfun$doWork$1.apply(TopicDeletionManager.scala:397) > at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:262) > at kafka.controller.TopicDeletionManager$DeleteTopicsThread.doWork(TopicDeletionManager.scala:397) > at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:63) > {quote} > -- This message was sent by Atlassian JIRA (v6.3.4#6332)