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

Nobody has claimed this yet.

Assessment

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

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.

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.

Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 12h
Merged PRs (30d)
25

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/rocketmq

All issues in apache/rocketmq

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.