-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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-18597 Fix max-buffer-utilization-percent is always 0 #18627
Conversation
@LoganZhuZzz This is a bug fix, so could you please add unit test? |
I’ll add the unit test later. |
@LoganZhuZzz additionally, please take a look at @ijuma's comment (#17390 (comment)) |
13ad210
to
a399709
Compare
a399709
to
66a8451
Compare
66a8451
to
3b3700d
Compare
@chia7712 PTAL |
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.
@LoganZhuZzz thanks for this patch!
|
||
/* a metric to track the maximum utilization of any thread's buffer in the last cleaning */ | ||
metricsGroup.newGauge(MaxBufferUtilizationPercentMetricName, | ||
() => maxOverCleanerThreads(_.lastStats.bufferUtilization) * 100) | ||
() => (maxOverCleanerThreads(_.lastStats.bufferUtilization) * 100).toInt) |
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.
Could you please add unit test for other impacted metrics?
} | ||
|
||
@Test | ||
def testMaxBufferUtilizationPercentMetric(): Unit = { |
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.
It seems this new unit test is similar to testMaxOverCleanerThreads
, right? If so, could you please remove testMaxOverCleanerThreads
?
…anerTest - Added testMaxBufferUtilizationPercentMetric to validate maximum buffer utilization metric. - Added testMaxCleanTimeMetric to verify the maximum clean time metric. - Added testMaxCompactionDelayMetrics to ensure correctness of maximum compaction delay metric.
) Reviewers: Chia-Ping Tsai <[email protected]>
) Reviewers: Chia-Ping Tsai <[email protected]>
https://issues.apache.org/jira/browse/KAFKA-18597
Committer Checklist (excluded from commit message)