-
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
client_async: Allow throwing an exception upon socket error during wakeup #2371
base: master
Are you sure you want to change the base?
client_async: Allow throwing an exception upon socket error during wakeup #2371
Conversation
@dpkp Can u please review this PR? |
wakeup When wakeup() is called, we sometime notice that we get an endless prints: "Unable to send to wakeup socket!". Those prints are spamming the logs. This commit aims to address it by allowing restating the application via an intentional exception raise. This behavior is configurable and its default is backward compatible. Signed-off-by: shimon-armis <[email protected]>
ce0c863
to
ef4721c
Compare
@shimon-armis do you have a traceback of the logs in question, and some sample code? |
…terations for Kafka 0.8.2 and Python 3.12 (dpkp#159) * skip failing tests for PyPy since they work locally * Reconfigure tests for PyPy and 3.12 * Skip partitioner tests in test_partitioner.py if 3.12 and 0.8.2 * Update test_partitioner.py * Update test_producer.py * Timeout tests after ten minutes * Set 0.8.2.2 to be experimental from hereon * Formally support PyPy 3.9
…ocket_error_during_wakeup
* Test Kafka 0.8.2.2 using Python 3.11 in the meantime * Override PYTHON_LATEST conditionally in python-package.yml * Update python-package.yml * add python annotation to kafka version test matrix * Update python-package.yml * try python 3.10
* Remove support for EOL'ed versions of Python * Update setup.py
Too many MRs to review... so little time.
After stop/start kafka service, kafka-python may use 100% CPU caused by busy-retry while the socket was closed. This fix the issue by unregister the socket if the fd is negative. Co-authored-by: Orange Kao <[email protected]>
Co-authored-by: Ryar Nyah <[email protected]>
Hey @wbarnha, It's been a while :) but here are some snippet I found in my slack's DM. |
@wbarnha Note that the suggested change is an acceptable practice, under the circumstances. |
…ocket_error_during_wakeup
I'm resuming work on this in wbarnha#134! |
Motivation
When wakeup() is called, we sometime notice that we get an endless prints:
"Unable to send to wakeup socket!".
Those prints are spamming the logs.
Description
This commit aims to address it by allowing restating the application via an intentional exception raise.
This behavior is configurable and its default is backward compatible.
We see this issue with kafka-python 2.0.2
This change is