The GitHub Actions job "Build and Run Tests by Bazel" on rocketmq.git/fix/pop-revive-offset-comparator has failed. Run started by GitHub user Aias00 (triggered by Aias00).
Head commit for run: 5da7a034991e253955bf8c6416462b58aab9051c / liuhy <[email protected]> Prevent POP checkpoint compareTo overflow on the revive path PopReviveService keeps inflight checkpoints in a TreeMap<PopCheckPoint, ...> (inflightReviveRequestMap), which orders keys via PopCheckPoint.compareTo. That comparator subtracted two long startOffsets and cast the result to int, the same overflow pattern already fixed for the reviveOffset sort in the prior commit. With large offset gaps the TreeMap could misorder keys and corrupt the revive ordering. Use Long.compare to preserve the full long ordering and add a regression test covering startOffsets separated by more than Integer.MAX_VALUE, including TreeMap ordering which exercises the actual PopReviveService usage. Constraint: startOffset is a long queue offset and can exceed int comparison range Rejected: Keep subtraction with a wider cast | Long.compare expresses the ordering directly and avoids overflow Confidence: high Scope-risk: narrow Directive: Do not compare long queue offsets by subtraction in POP checkpoint ordering Tested: mvn -pl store -Dtest=PopCheckPointTest test Tested: git diff --check Co-Authored-By: Claude <[email protected]> Report URL: https://github.com/apache/rocketmq/actions/runs/29093121969 With regards, GitHub Actions via GitBox
