apache / apache/rocketmq

Cold data control may skip the group with the highest threshold

Open Beginner friendly
#10,851 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 1h
Merged PRs (30d)
27

Description

### Description

ColdDataCgCtrService sorts configured thresholds by subtracting two long values and narrowing the result to int. A large threshold delta can overflow the comparator and place the largest threshold after smaller entries. Because only three groups are decelerated per cycle, the group with the highest threshold can be skipped.

### Expected behavior

Sort thresholds with Long.compare so the three largest eligible groups are always processed.

Contributor guide

Open the contributing guide

Research direction

Start at ColdDataCgCtrService and locate the comparator that orders configured thresholds. Confirm the ordering with a large threshold difference, then verify that the three largest eligible groups are selected for deceleration without comparator overflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.