RockteMQ-AI commented on issue #10851: URL: https://github.com/apache/rocketmq/issues/10851#issuecomment-5225267008
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The issue is valid. `ColdDataCgCtrService` sorts thresholds by subtracting two `long` values and narrowing to `int`. A large threshold delta overflows the comparator, placing the highest threshold after smaller entries. Since only three groups are decelerated per cycle, the group with the highest threshold can be skipped. **Root Cause:** `(int)(a - b)` comparator pattern on `long` threshold values. **Impact:** Cold data control — groups with the highest thresholds may never be processed. **Severity:** medium **Recommended fix:** Replace with `Long.compare(a, b)` for overflow-safe sorting. An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by RockteMQ-AI* -- 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]
