Andrew Olson created KAFKA-4152:
-----------------------------------

             Summary: Reduce severity level of metadata fetch failure logging 
for nonexistent topics
                 Key: KAFKA-4152
                 URL: https://issues.apache.org/jira/browse/KAFKA-4152
             Project: Kafka
          Issue Type: Improvement
          Components: clients
            Reporter: Andrew Olson


If a consumer proactively subscribes to one or more topics that don't already 
exist, but are expected to exist in the near future, warnings are repeatedly 
logged by the NetworkClient throughout the consumer's lifetime until the topic 
eventually gets created like,

{noformat}
org.apache.kafka.clients.NetworkClient [WARN]
Error while fetching metadata with correlation id 1 : 
{MY.NEW.TOPIC=UNKNOWN_TOPIC_OR_PARTITION,
ANOTHER.NEW.TOPIC=UNKNOWN_TOPIC_OR_PARTITION}
{noformat}

The NetworkClient's warning logging code for metadata fetch failures is rather 
generic, but could potentially examine the reason to log at debug level for 
UNKNOWN_TOPIC_OR_PARTITION and warn for all others. As these warnings could be 
very valuable for troubleshooting in some situations a reasonable approach 
might be to remember the unknown topics that it has logged a warning for, and 
reduce the log level from warning to debug for future logging for the same 
topics for the same common cause of not (yet, presumably) existing, although 
that does introduce some undesirable complexity.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to