mqadmin commands misorder large counters and timestamps
- 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
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