Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
karapace: avoid starting until topic its successfully created
Since the underlying `create_topics` function unless the `operation_timeout` its async (the effects of this call aren't immediately visible after the call its performed), if karapace its started on a cluster that its slow enough in creating the topic, we get an unhandled exception in the startup of the service of type: ``` aiokafka.errors.UnknownTopicOrPartitionError: [Error 3] UnknownTopicOrPartitionError ``` The fix its simple, try to query from the cluster (immediately after having commanded the creation of the topic) the offsets of the topic. If the returned status its `OFFSET_UNINITIALIZED` we simply need to try again shortly later.
- Loading branch information