apache / apache/rocketmq

Pop revive service may process large revive offsets out of order

Open Beginner friendly
#10,852 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

PopReviveService builds its checkpoint list with a comparator that subtracts two long revive offsets and casts the difference to int. Offsets separated by more than Integer.MAX_VALUE can be reversed, causing mergeAndRevive to process checkpoints in the wrong order.

### Expected behavior

Compare revive offsets with Long.compare so checkpoint order remains ascending across the full long range.

Contributor guide

Open the contributing guide

Research direction

Start in PopReviveService where the checkpoint list comparator is built, then trace how mergeAndRevive consumes that list. Replace the offset comparison so values across the full long range remain in ascending order, and verify that large revive offsets are no longer processed out of order.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.