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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11634
   
   ### Brief Description
   
   In `SkipAccumulationSubCommand#execute`, `-c / --cluster` (`clusterName`) 
was passed to `defaultMQAdminExt.resetOffsetByTimestamp(clusterName, topic, 
group, timestamp, force)` on the online path, but dropped in the 
`ResponseCode.CONSUMER_NOT_ONLINE` fallback by calling the 4-argument 
`resetOffsetByTimestampOld(group, topic, timestamp, force)`. For LMQ topics 
(`%LMQ%...`) and `rmq_sys_wheel_timer`, 
`DefaultMQAdminExtImpl#resetOffsetByTimestampOld` needs `clusterName` to look 
up the route topic.
   
   This PR:
   - Passes `clusterName` to 
`defaultMQAdminExt.resetOffsetByTimestampOld(clusterName, group, topic, 
timestamp, force)` in the `CONSUMER_NOT_ONLINE` fallback (matching 
`ResetOffsetByTimeCommand`).
   - Extracts a package-private `createDefaultMQAdminExt(RPCHook)` factory 
method in `SkipAccumulationSubCommand` for unit testing.
   - Adds unit tests in `SkipAccumulationCommandTest` covering both the offline 
fallback preserving `clusterName` and the online path.
   
   ### How Did You Test This Change?
   
   - Ran `mvn test -pl tools -Dtest=SkipAccumulationCommandTest` (Checkstyle: 0 
violations, SpotBugs: 0 errors, Tests run: 3, Failures: 0, Errors: 0, Skipped: 
1 pre-existing `@Ignore`).
   


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