NANASHIdl opened a new issue, #11589: URL: https://github.com/apache/rocketmq/issues/11589
### Before Creating the Bug Report - [x] I found a bug and am reporting it here. - [x] I searched the repository's Issues and Discussions for duplicates. - [x] I confirmed the bug belongs to this repository. ### Runtime platform environment Windows 10 (x86_64) ### RocketMQ version `develop` at `6dc350534d3bf7629694a77c677d768d6d4c8201` ### JDK Version Oracle JDK 17 (17+35-LTS-2724) ### Describe the Bug When all recorded durations are zero milliseconds, `PerfCounter.getMax()` returns `99999999`. The store performance log prints that value as the maximum duration. The reverse scan stops before bucket 0, which holds zero-millisecond samples. ### Steps to Reproduce Run the following in a unit test. No running broker is needed. ```java PerfCounter counter = new PerfCounter(); counter.flow(0); assertEquals(0, counter.getMax()); ``` ### What Did You Expect to See? The maximum is `0` ms, the only recorded duration. ### What Did You See Instead? The assertion fails with `expected:<0> but was:<99999999>`. -- 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]
