Metastarx opened a new issue, #11360: URL: https://github.com/apache/rocketmq/issues/11360
PopCheckPoint.compareTo (store/src/main/java/org/apache/rocketmq/store/pop/PopCheckPoint.java:214-215) returns (int) (this.getStartOffset() - o.getStartOffset()). startOffset is a long queue offset, so the subtraction is 64-bit and the cast to int discards the high 32 bits; whenever two offsets differ by more than Integer.MAX_VALUE the sign of the result can be inverted, breaking the Comparable total-order contract (antisymmetry/transitivity). This is the same defect that was fixed for the mqadmin comparators (ConsumerProgressSubCommand/PrintMessageByQueueCommand/QueryMsgByUniqueKeySubCommand), which now use Long.compare. -- 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]
