Before Creating the Bug Report
Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
RocketMQ version
Branch: develop
Git commit: fd0c959
JDK Version
Zulu OpenJDK 8 (8.94.0.17)
Describe the Bug
StatisticsBrief validates only the outer shape of percentile metadata. Non-positive slot counts, non-increasing range boundaries, and slot counts wider than their range are accepted. These values can later cause division by zero, invalid slot calculations, or array-size overflow.
Steps to Reproduce
- Construct StatisticsBrief with metadata such as {{10, 0}}, {{10, 2}, {10, 2}}, or {{10, 11}}.
- Sample a value or calculate the slot count.
- Observe invalid arithmetic or inconsistent bucket behavior.
What Did You Expect to See?
The constructor should reject invalid metadata with IllegalArgumentException.
What Did You See Instead?
Malformed metadata passes validation and fails later in statistics processing.
Additional Context
The invalid cases are reproducible with focused StatisticsBrief unit tests.
Before Creating the Bug Report
Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
RocketMQ version
Branch: develop
Git commit: fd0c959
JDK Version
Zulu OpenJDK 8 (8.94.0.17)
Describe the Bug
StatisticsBrief validates only the outer shape of percentile metadata. Non-positive slot counts, non-increasing range boundaries, and slot counts wider than their range are accepted. These values can later cause division by zero, invalid slot calculations, or array-size overflow.
Steps to Reproduce
What Did You Expect to See?
The constructor should reject invalid metadata with IllegalArgumentException.
What Did You See Instead?
Malformed metadata passes validation and fails later in statistics processing.
Additional Context
The invalid cases are reproducible with focused StatisticsBrief unit tests.