Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Avoid more cases of client wakeup when sending from sender / same thread #1765

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

Closed
wants to merge 1 commit into from

Conversation

braedon
Copy link
Contributor

@braedon braedon commented Mar 27, 2019

Extra fixes for #1760.

Note that I don't pretend to fully understand the threading/socket setup here - just extending the fix from #1761 to cover more cases, as my code seems to be hitting the _maybe_refresh_metadata() path, and I spotted a few others that looked similar.

I've done a couple of long running tests with this fix, and haven't run into any more KafkaTimeoutErrors on wakeup().

This still only covers producer calls. Is this issue/fix relevant to the consumer as well, or any other users of KafkaClient?


This change is Reviewable

@braedon
Copy link
Contributor Author

braedon commented Mar 27, 2019

Some are just due to the extra parameter on calls, but it looks like a lot of the producer tests are (ironically?) failing with KafkaTimeoutErrors.

Haven't had a chance to look into it, but I'm guessing at least one of the bypassed wakeup()s is actually required, at least for the way the tests are set up, despite the producer seeming to work in practice.

As noted above, I'm not familiar enough with the threading and networking stuff going on here to really know how to debug those failures...

@jeffwidman
Copy link
Contributor

Oops, accidentally wrote my earlier comment from my work account, so deleted that.

Yeah, the threading/networking stuff here is tricky. @dpkp is the one who best understands, by far.

@dpkp
Copy link
Owner

dpkp commented Mar 29, 2019

I think #1767 is a simpler fix for the root issue here. Want to give it a try?

@braedon
Copy link
Contributor Author

braedon commented Mar 29, 2019

Thanks @dpkp, I'll take a look.

@dpkp
Copy link
Owner

dpkp commented Mar 30, 2019

Thanks for the PR! I've updated / simplified a bit and fixed tests in #1769 , so I'm going to close this one.

@dpkp dpkp closed this Mar 30, 2019
@braedon braedon deleted the 1760_further_sender_dont_wakeup branch April 2, 2019 06:57
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.

3 participants