NANASHIdl opened a new pull request, #11590:
URL: https://github.com/apache/rocketmq/pull/11590

   ### Which Issue(s) This PR Fixes
   
   Fixes #11589
   
   ### Brief Description
   
   Include bucket 0 when scanning for the maximum recorded duration in 
`PerfCounter.getMax()`. Bucket 0 holds zero-millisecond samples. Previously, a 
counter with only zero-millisecond samples returned `99999999`, which the store 
performance log printed as the maximum.
   
   ### How Did You Test This Change?
   
   Ran `mvn -pl store -am -Dtest=PerfCounterTest 
-Dsurefire.failIfNoSpecifiedTests=false test` on JDK 17. Both tests passed. The 
zero-duration test reproduced the failure before the fix, and the 
mixed-duration test confirms that recording zero after a 7 ms sample still 
yields a maximum of 7 ms.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to