chia7712 commented on code in PR #18674:
URL: https://github.com/apache/kafka/pull/18674#discussion_r1927289096


##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/KafkaMetricHistogram.java:
##########
@@ -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));

Review Comment:
   out of curiosity, `HdrHistogram` is the wrap of HdrHistogram API, so maybe 
we can move this protection into `HdrHistogram`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to