You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2019/01/09 20:55:01 UTC
[jira] [Created] (KAFKA-7808) AdminClient#describeTopic should not
throw InvalidTopic if topic name is not found
Guozhang Wang created KAFKA-7808:
------------------------------------
Summary: AdminClient#describeTopic should not throw InvalidTopic if topic name is not found
Key: KAFKA-7808
URL: https://issues.apache.org/jira/browse/KAFKA-7808
Project: Kafka
Issue Type: Improvement
Components: admin
Reporter: Guozhang Wang
In AdminClient#describeTopic, we have the following logic:
{code}
if (!cluster.topics().contains(topicName)) {
future.completeExceptionally(new InvalidTopicException("Topic " + topicName + " not found."));
continue;
}
{code}
However, {{InvalidTopicException}} is a non-retriable exception and is used to indicate that topic contains invalid chars or topic name is too long etc, and hence not correct to use. We should, instead, throw the retriable {{UnknownTopicOrPartitionException}} instead.
We should make sure any callers on this logic should be cleaned up when fixing it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)