-
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
Thread safety on producer.metrics()
#1681
Comments
see PR #1682 |
Well, it makes sense for Producer, as we declare it as Thread safe for sending. |
tvoinarovskyi
pushed a commit
that referenced
this issue
Dec 27, 2018
Closing this, as the fix was merged. Thanks for the contribution! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's seems there is a thread safety issue when retrieving producer metrics from an independent thread.
We did not encounter this behavior on consumers but we checked the library code it should be affected too.
This is the error we got when reading metrics for a producer:
Here is the current faulty code in the producer (note the direct use of self._metrics.metrics):
One solution is to return a copy of actual metrics :
I will create a PR for this
The text was updated successfully, but these errors were encountered: