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.
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.