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-15176: add tests for tiered storage metrics #13999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started on my first pass and left a couple of comments. I will circle back later on.
This PR is ready for review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! It looks good to me barring the two small comments.
// RemoteLogReader should not be all idle | ||
assertTrue(yammerMetricValue("RemoteLogReaderAvgIdlePercent").asInstanceOf[Double] < 1.0) | ||
// RemoteLogReader should queue some tasks | ||
assertTrue(yammerMetricValue("RemoteLogReaderTaskQueueSize").asInstanceOf[Int] > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the above cannot be equal to 0.0 because of some uncertainty tolerance of when the metric is recorded, but why can this not be equal to 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, @clolov !
For RemoteLogReaderAvgIdlePercent
, it should be 0.0
since all threads are blocked by the latch.
For RemoteLogReaderTaskQueueSize
, yes, it should be 3.
I verified them as a conservative way to tolerate some uncertainties. But maybe I can assert the 2nd one to be 3. If it becomes flaky, we can relieve the assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you for the explanation and the change, the latest version looks ready for merging to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @showuon for the PR. LGTM
It seems this commit caused the below build failure. I raised #14065 to fix it.
|
Added tests for metrics: 1. RemoteLogReaderTaskQueueSize 2. RemoteLogReaderAvgIdlePercent 3. RemoteLogManagerTasksAvgIdlePercent Also, added tests for OffsetOutOfRangeException will be thrown while reading logs Reviewers: Christo Lolov <christololov@gmail.com>, Satish Duggana <satishd@apache.org>
Added tests for metrics: 1. RemoteLogReaderTaskQueueSize 2. RemoteLogReaderAvgIdlePercent 3. RemoteLogManagerTasksAvgIdlePercent Also, added tests for OffsetOutOfRangeException will be thrown while reading logs Reviewers: Christo Lolov <christololov@gmail.com>, Satish Duggana <satishd@apache.org>
Added tests for metrics: 1. RemoteLogReaderTaskQueueSize 2. RemoteLogReaderAvgIdlePercent 3. RemoteLogManagerTasksAvgIdlePercent Also, added tests for OffsetOutOfRangeException will be thrown while reading logs Reviewers: Christo Lolov <christololov@gmail.com>, Satish Duggana <satishd@apache.org>
Added tests for metrics:
Also, added tests for
OffsetOutOfRangeException
will be thrown while reading logsCommitter Checklist (excluded from commit message)