Skip to content

Commit

Permalink
Fix logging on failed schema reader topic creation
Browse files Browse the repository at this point in the history
The `topic` variable is of course nonexistent if the topic creation
fails with an exception.
  • Loading branch information
Mátyás Kuti committed Dec 7, 2023
1 parent f247134 commit da402bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions karapace/schema_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ def run(self) -> None:
except InvalidReplicationFactorError:
LOG.info(
"[Schema Topic] Failed to create topic %r, not enough Kafka brokers ready yet, retrying",
topic.topic,
self.config["topic_name"],
)
self._stop_schema_reader.wait(timeout=SCHEMA_TOPIC_CREATION_TIMEOUT_SECONDS)
except: # pylint: disable=bare-except
LOG.exception("[Schema Topic] Failed to create %r, retrying", topic.topic)
LOG.exception("[Schema Topic] Failed to create %r, retrying", self.config["topic_name"])
self._stop_schema_reader.wait(timeout=SCHEMA_TOPIC_CREATION_TIMEOUT_SECONDS)

while not self._stop_schema_reader.is_set():
Expand Down

0 comments on commit da402bd

Please sign in to comment.