-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression issue of KafkaConsumer.partitions_for_topic since 1.4.5 #1789
Comments
having the same issue
using 1.4.6... |
I'm having the same issue. Seems like Making def partitions_for_topic(self, topic):
"""(...)"""
cluster = self._client.cluster
if self._client._metadata_refresh_in_progress and self._client._topics:
future = cluster.request_update()
self._client.poll(future=future)
stash = cluster.need_all_topic_metadata
cluster.need_all_topic_metadata = True
future = cluster.request_update()
self._client.poll(future=future)
cluster.need_all_topic_metadata = stash
return self._client.cluster.partitions_for_topic(topic) |
Indeed, this is a dupe of #1774 I have no had a chance to look at the fix myself yet |
I have this weird behavior since >=1.4.5 :
KafkaConsumer.partitions_for_topic() return None at the first call, even if the partition exist.
If we do call another method (ex: topics() ) then we call partitions_for_topic() it will work.
After few test 1.4.4 seems to work properly.
Code to reproduce the error:
I usually investigate further more but I'm in a rush right now :/ maybe in few days :)
The text was updated successfully, but these errors were encountered: