[
https://issues.apache.org/jira/browse/KAFKA-13733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17507346#comment-17507346
]
dengziming commented on KAFKA-13733:
------------------------------------
I don't think this is a bug, In fact UnknownTopicOrPartitionException is a
retriable error so the clients will retry infinitely until Timeout, so you will
receive a TimeoutExecption when timeout.
Maybe you should inspect your log4j properties so you can see the info log when
retrying.
> Reset consumer group offset with not exist topic throw wrong exception
> ----------------------------------------------------------------------
>
> Key: KAFKA-13733
> URL: https://issues.apache.org/jira/browse/KAFKA-13733
> Project: Kafka
> Issue Type: Bug
> Components: core
> Reporter: Yujie Li
> Priority: Major
>
> Hey,
> I'm seen a bug with misleading exception when I try to reset consumer group
> offset with not exist topic by:
> `kafka-consumer-groups --bootstrap-server $brokers --reset-offsets --group
> <consumer-group-name> --topic <topic-not-exist>:0 --to-offset <offset-num>`
> And got:
>
> ```
> Error: Executing consumer group command failed due to
> org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node
> assignment. Call: metadatajava.util.concurrent.ExecutionException:
> org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node
> assignment. Call: metadata
> at
> java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
> at
> java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
> at
> org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:165)
> at
> kafka.admin.ConsumerGroupCommand$ConsumerGroupService.getLogStartOffsets(ConsumerGroupCommand.scala:654)
> at
> kafka.admin.ConsumerGroupCommand$ConsumerGroupService.checkOffsetsRange(ConsumerGroupCommand.scala:888)
> at
> kafka.admin.ConsumerGroupCommand$ConsumerGroupService.prepareOffsetsToReset(ConsumerGroupCommand.scala:796)
> at
> kafka.admin.ConsumerGroupCommand$ConsumerGroupService.$anonfun$resetOffsets$1(ConsumerGroupCommand.scala:437)
> at scala.collection.IterableOnceOps.foldLeft(IterableOnce.scala:646)
> at scala.collection.IterableOnceOps.foldLeft$(IterableOnce.scala:642)
> at scala.collection.AbstractIterable.foldLeft(Iterable.scala:919)
> at
> kafka.admin.ConsumerGroupCommand$ConsumerGroupService.resetOffsets(ConsumerGroupCommand.scala:432)
> at kafka.admin.ConsumerGroupCommand$.run(ConsumerGroupCommand.scala:76)
> at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:59)
> at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala)
> Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting
> for a node assignment. Call: metadata
> I think it should throw TopicNotExistException/NotAuthorizeException instead.
> ```
> Thoughts: we should add topic permission / exist check in reset offset call
> https://github.com/apache/kafka/blob/3.1/core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala#L421
>
> Let me know what do you think!
>
> Thanks,
> Yujie
--
This message was sent by Atlassian Jira
(v8.20.1#820001)