You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by David Seapy <ds...@gmail.com> on 2022/12/20 19:31:12 UTC

bug with kraft recreating topics with periods in the name

When using KRaft, trying to re-create a topic with a period in the name
fails with the following stacktrace:

[2022-12-20 13:58:45,991] WARN [Controller 1] createTopics: failed with
> unknown server exception NoSuchElementException at epoch 2 in 56 us.
> Renouncing leadership and reverting to the last committed offset 173.
> (org.apache.kafka.controller.QuorumController)
> java.util.NoSuchElementException
> at
> org.apache.kafka.timeline.SnapshottableHashTable$CurrentIterator.next(SnapshottableHashTable.java:167)
> at
> org.apache.kafka.timeline.SnapshottableHashTable$CurrentIterator.next(SnapshottableHashTable.java:139)
> at
> org.apache.kafka.timeline.TimelineHashSet$ValueIterator.next(TimelineHashSet.java:120)
> at
> org.apache.kafka.controller.ReplicationControlManager.validateNewTopicNames(ReplicationControlManager.java:799)
> at
> org.apache.kafka.controller.ReplicationControlManager.createTopics(ReplicationControlManager.java:567)
> at
> org.apache.kafka.controller.QuorumController.lambda$createTopics$7(QuorumController.java:1832)
> at
> org.apache.kafka.controller.QuorumController$ControllerWriteEvent.run(QuorumController.java:767)
> at
> org.apache.kafka.queue.KafkaEventQueue$EventContext.run(KafkaEventQueue.java:121)
> at
> org.apache.kafka.queue.KafkaEventQueue$EventHandler.handleEvents(KafkaEventQueue.java:200)
> at
> org.apache.kafka.queue.KafkaEventQueue$EventHandler.run(KafkaEventQueue.java:173)
> at java.base/java.lang.Thread.run(Thread.java:829)
> Following steps 1-3 of the quickstart with "Kafka with KRaft" in step (2)
>

  This error does not happen with zookeeper, only with kraft.
Steps to reproduce are to follow steps 1-2 in
https://kafka.apache.org/quickstart.  Then run:

bin/kafka-topics.sh --create --topic foo.bar --bootstrap-server
> localhost:9092
> bin/kafka-topics.sh --delete --topic foo.bar --bootstrap-server
> localhost:9092
> bin/kafka-topics.sh --create --topic foo.bar --bootstrap-server
> localhost:9092
>

Re: bug with kraft recreating topics with periods in the name

Posted by José Armando García Sancio <js...@confluent.io.INVALID>.
Hi David,

It is likely that you are running into this issue:
https://issues.apache.org/jira/browse/KAFKA-14337

Can you try with trunk or the fixed versions enumerated in that jira?

Thanks,
-- 
-José