You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yuluo-yx (via GitHub)" <gi...@apache.org> on 2026/08/09 04:29:35 UTC

[I] [Bug] StatisticsBrief accepts invalid percentile metadata [rocketmq]

yuluo-yx opened a new issue, #10871:
URL: https://github.com/apache/rocketmq/issues/10871

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just a question.
   - [x] I searched open GitHub Issues and pull requests and found no duplicate.
   - [x] I confirmed that this bug belongs to Apache RocketMQ.
   
   ### Runtime platform environment
   
   macOS (Darwin), reproduced with an isolated local unit test.
   
   ### RocketMQ version
   
   Branch: develop
   Git commit: fd0c95920e0deac96ce2ae27442747cc5e65e930
   
   ### 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
   
   1. Construct StatisticsBrief with metadata such as {{10, 0}}, {{10, 2}, {10, 2}}, or {{10, 11}}.
   2. Sample a value or calculate the slot count.
   3. 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.


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

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


Re: [I] [Bug] StatisticsBrief accepts invalid percentile metadata [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10871:
URL: https://github.com/apache/rocketmq/issues/10871#issuecomment-5229881526

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   **Root Cause:** `StatisticsBrief` accepts percentile metadata values outside the valid range [0.0, 1.0] without validation. Invalid percentile values (negative or >1.0) are silently accepted, leading to incorrect statistical calculations.
   **Impact:** Metrics/statistics — consumers of statistics data may receive misleading percentile values when invalid metadata is provided.
   **Severity:** low
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
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: commits-unsubscribe@rocketmq.apache.org

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