beautyarbutin opened a new pull request, #11181:
URL: https://github.com/apache/rocketmq/pull/11181

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11180
   
   ### Brief Description
   
   `PopCheckPoint.indexOfAck` narrowed the difference between an ACK offset and 
the checkpoint start offset from `long` to `int` before matching it against 
`queueOffsetDiff`. A difference larger than `Integer.MAX_VALUE` could therefore 
wrap to a valid popped-message offset and acknowledge the wrong checkpoint 
entry.
   
   Keep the difference as a `long`, reject negative or non-representable values 
before narrowing, and add a regression test covering normal, before-start, and 
wrapped ACK offsets.
   
   ### How Did You Test This Change?
   
   - `mvn -B -pl store -am -DskipITs -Dtest=PopCheckPointTest 
-Dsurefire.failIfNoSpecifiedTests=false test`
     - 2 tests, 0 failures, 0 errors
   - `mvn -B -pl store -am -DskipITs test`
     - 329 tests, 0 failures, 0 errors, 18 skipped
     - Checkstyle and SpotBugs passed


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

Reply via email to