apache / apache/rocketmq

mqadmin commands misorder large counters and timestamps

Open
#10,850 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

Several mqadmin comparators subtract long values and cast the result to int. Consumer lag, tag counts, and message store timestamps can therefore be ordered incorrectly once their difference exceeds the int range.

Affected commands include consumerProgress, printMessageByQueue, and queryMsgByUniqueKey.

### Expected behavior

Use overflow-safe long comparison so command output remains correctly ordered for large values.

Contributor guide

Open the contributing guide

Research direction

Start with the comparator implementations used by the consumerProgress, printMessageByQueue, and queryMsgByUniqueKey mqadmin commands, focusing on comparisons of consumer lag, tag counts, and message store timestamps. Verify ordering with values whose differences exceed the int range; done means large counters and timestamps remain correctly ordered in command output.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.