-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
KAFKA-18489 - Fix Connector tasks metrics task-startup-attempts, task… #18762
base: trunk
Are you sure you want to change the base?
Conversation
Thanks for the PR. I've not looked into this issue but if we're fixing some logic then I was expecting some updates in the tests too. Why are the existing tests passing if you say that some metrics are not updated correctly? Are they not tested? |
Thanks @mimaison - yes. What we have are unit tests for workermetricsgroup - which ensure that if wrappedListener is used metrics will get updated. But there are no tests to ensure that workermetricsgroup's task status listener is used while building tasks |
Ok, then we need to create these tests in this PR. We can't just change code without adding matching tests. |
A label of 'needs-attention' was automatically added to this PR in order to raise the |
@mimaison thanks ! Can you please point to a test where we check the value of metrics using JMX so that I can create a test based on it ? |
Have a look in |
A label of 'needs-attention' was automatically added to this PR in order to raise the |
…-startup-success
A minor bug was introduced as part of EOS in Apache Kafka 3 years ago The line
wraps herder's listener in workerMetricsGroup's listener. WorkerMetricsGroup is the entity which records task success and failure in the metric .
In the PR, the wrapped listener was missed and instead the herder listener is passed to the task builder (as part of constructor).
workerMetricsGroup's UT already validates that the metrics get updated when tasks fail or succeed.
I did not see a way to test connector's metrics using JMX
Committer Checklist (excluded from commit message)