-
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
MINOR: prevent exception from HdrHistogram #18674
Conversation
@@ -125,6 +127,6 @@ public List<NamedMeasurable> stats() { | |||
|
|||
@Override | |||
public void record(MetricConfig config, double value, long timeMs) { | |||
hdrHistogram.record((long) value); | |||
hdrHistogram.record(Math.min(highestTrackableValue, (long) value)); |
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.
Should we add a unit test for this change in KafkaMetricHistogramTest
?
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.
out of curiosity, HdrHistogram
is the wrap of HdrHistogram API, so maybe we can move this protection into HdrHistogram
?
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.
LGTM
#18735 is handling the flaky |
HdrHistogram can throw an exception if the recorded value is greater than a configured limit. Expand the ceiling from per-metric to all invocations. Reviewers: David Jacot <[email protected]>, Chia-Ping Tsai <[email protected]>
picked to 4.0 |
…ibrdkafka-compressed-produce-fails * apache-github/trunk: MINOR: prevent exception from HdrHistogram (apache#18674) KAFKA-18653: Fix mocks and potential thread leak issues causing silent RejectedExecutionException in share group broker tests (apache#18725) KAFKA-18646: Null records in fetch response breaks librdkafka (apache#18726) KAFKA-18619: New consumer topic metadata events should set requireMetadata flag (apache#18668) KAFKA-18488: Improve KafkaShareConsumerTest (apache#18728)
HdrHistogram can throw an exception if the recorded value is greater than a configured limit. Expand the ceiling from per-metric to all invocations. Using existing test.
Committer Checklist (excluded from commit message)