Hi Kashyap,

This may be a real issue with delete-topic feature, could you also
reproduce this with trunk HEAD and 1 partition/1 replica?

Guozhang


On Mon, May 12, 2014 at 9:39 AM, Kashyap Mhaisekar <kashya...@gmail.com>wrote:

> Hi,
> I am hitting a strange exception while creating a topic in Kafka -
> Steps to generate this-
> 1. Created a topic multipartition_test with 2 partitions and 2 replicas
> 2. Added some data to this topics and verified data is coming up for both
> partitions
> 3. Deleted the topic. Checked only the zookeeper to see if the
> /brokers/topics DOES NOT have the topic
> 4. Recreated the topic in exactly the same way as in point 1.
>
> After this, when I list topics using ./kafka-list-topic.sh, i see that
> *leader:* none and *isr:* for this topic. State change logs give the
> following exception.
>
> kafka.common.StateChangeFailedException: encountered error while electing
> leader for partition [multipartition_test,1] due to: LeaderAndIsr
> information doesn't exist for partition [multipartition_test,1] in
> OnlinePartition state.
>         at
>
> kafka.controller.PartitionStateMachine.electLeaderForPartition(PartitionStateMachine.scala:327)
>         at
>
> kafka.controller.PartitionStateMachine.kafka$controller$PartitionStateMachine$$handleStateChange(PartitionStateMachine.scala:154)
>         at
>
> kafka.controller.PartitionStateMachine$$anonfun$handleStateChanges$2.apply(PartitionStateMachine.scala:110)
>         at
>
> kafka.controller.PartitionStateMachine$$anonfun$handleStateChanges$2.apply(PartitionStateMachine.scala:109)
>         at scala.collection.immutable.Set$Set2.foreach(Set.scala:101)
>         at
>
> kafka.controller.PartitionStateMachine.handleStateChanges(PartitionStateMachine.scala:109)
>         at
>
> kafka.controller.KafkaController.onNewPartitionCreation(KafkaController.scala:325)
>         at
>
> kafka.controller.KafkaController.onNewTopicCreation(KafkaController.scala:312)
>         at
>
> kafka.controller.PartitionStateMachine$TopicChangeListener.liftedTree1$1(PartitionStateMachine.scala:376)
>         at
>
> kafka.controller.PartitionStateMachine$TopicChangeListener.handleChildChange(PartitionStateMachine.scala:361)
>         at org.I0Itec.zkclient.ZkClient$7.run(ZkClient.java:568)
>         at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)
> Caused by: kafka.common.StateChangeFailedException: LeaderAndIsr
> information doesn't exist for partition [multipartition_test,1] in
> OnlinePartition state
>         at
>
> kafka.controller.PartitionStateMachine.getLeaderIsrAndEpochOrThrowException(PartitionStateMachine.scala:347)
>         at
>
> kafka.controller.PartitionStateMachine.electLeaderForPartition(PartitionStateMachine.scala:291)
>         ... 11 more
>
> Can you please help what am I doing wrong?
>
> Regards,
> kashyap
>



-- 
-- Guozhang

Reply via email to