diff options
author | Dana Powers <dana.powers@gmail.com> | 2019-12-29 12:15:53 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2019-12-29 12:15:53 -0800 |
commit | 874e7e0aad61f4f86b90f91fc266c9e240891a29 (patch) | |
tree | 0c6ef60fabee1d1590d192e98932eeaeeca7d3ed | |
parent | cf28da8420b007d836b0db9d865d74fee89cdbcd (diff) | |
download | kafka-python-issue-1088-full-topic-metadata-skip-error-logging.tar.gz |
Do not log topic-specific errors in full metadata fetchissue-1088-full-topic-metadata-skip-error-logging
-rw-r--r-- | kafka/cluster.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/cluster.py b/kafka/cluster.py index 19137de..438baf2 100644 --- a/kafka/cluster.py +++ b/kafka/cluster.py @@ -285,6 +285,10 @@ class ClusterMetadata(object): _new_broker_partitions[leader].add( TopicPartition(topic, partition)) + # Specific topic errors can be ignored if this is a full metadata fetch + elif self.need_all_topic_metadata: + continue + elif error_type is Errors.LeaderNotAvailableError: log.warning("Topic %s is not available during auto-create" " initialization", topic) |