Metastarx opened a new pull request, #11361: URL: https://github.com/apache/rocketmq/pull/11361
### Which Issue(s) This PR Fixes (local scan, no link) - Fixes #11360 ### Brief Description A checkpoint is compared by start offset in several places, and the comparison was written as `(int) (this.startOffset - o.startOffset)`. Because startOffset is a 64-bit queue offset, casting the 64-bit difference to int discards the high bits, so once two offsets differ by more than Integer.MAX_VALUE the sign can invert and the ordering stops being a valid total order. That matters because PopReviveService keys its inflightReviveRequestMap TreeMap by this type and relies on containsKey, remove and firstKey, and because checkpoints from many different original topics and groups sit in the same revive queue with independent offsets. ### How Did You Test This Change? `mvn test -pl broker,store` - passed (Tests run: 834, Failures: 0, Errors: 0, Skipped: 4) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
