Skip to content

Conversation

@dpkp
Copy link
Owner

@dpkp dpkp commented Mar 30, 2019

This is a simplification of #1765 , intended to address / fix #1760 . The underlying issue here is that if the wakeup socket is full, and so will block on writes, we don't want anything within the poll() method to attempt to write to this socket. This PR updates _maybe_refresh_metadata() to not use wakeups. Because this method is only ever called within poll(), I have made the default wakeup=False. In the future, if the method were invoked from outside / another thread, we would want to pass wakeup=True.


This change is Reviewable

@dpkp dpkp merged commit b1effa2 into master Mar 31, 2019
@dpkp dpkp deleted the maybe_refresh_metadata_no_wakeup branch March 31, 2019 02:29
@jeffwidman
Copy link
Contributor

In the future, if the method were invoked from outside / another thread, we would want to pass wakeup=True.

Do you want to document that with an inline code comment?

@braedon
Copy link
Contributor

braedon commented Apr 2, 2019

This fix seems to work for me - I haven't been able to reproduce #1760 with it. 🤞

Thanks for all your work on this @dpkp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.4.5] KafkaProducer raises KafkaTimeoutError when attempting wakeup()

4 participants