leaveWhite9088 opened a new issue, #11634:
URL: https://github.com/apache/rocketmq/issues/11634

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   - [x] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions) of this repository 
and believe that this is not a duplicate.
   - [x] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   ### Runtime platform environment
   
   OS: Windows 11 (platform-independent logic bug in `rocketmq-tools`)
   
   ### RocketMQ version
   
   - branch: `develop`
   - version: `5.5.1`
   - Git commit id: `4b7aafa67`
   
   ### JDK Version
   
   Eclipse Temurin JDK 11.0.33
   
   ### Describe the Bug
   
   In 
`tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java`,
 `-c / --cluster` ("Cluster name or lmq parent topic, lmq is used to find the 
route.") is passed to `defaultMQAdminExt.resetOffsetByTimestamp(clusterName, 
topic, group, timestamp, force)` on the online path, but dropped in the 
`ResponseCode.CONSUMER_NOT_ONLINE` fallback:
   
   ```java
   if (ResponseCode.CONSUMER_NOT_ONLINE == e.getResponseCode()) {
       List<RollbackStats> rollbackStatsList = 
defaultMQAdminExt.resetOffsetByTimestampOld(group, topic, timestamp, force);
   ```
   
   Because `DefaultMQAdminExtImpl#resetOffsetByTimestampOld(String clusterName, 
...)` relies on a non-empty `clusterName` as `routeTopic` when querying route 
info for LMQ (`%LMQ%...`) or `rmq_sys_wheel_timer`, calling the 4-argument 
overload passes `clusterName = null` and causes route lookup to fail when the 
consumer group is offline. (By contrast, `ResetOffsetByTimeCommand` passes 
`clusterName` to `ResetOffsetByTimeOldCommand.resetOffset` in the same 
`CONSUMER_NOT_ONLINE` fallback.)
   
   ### Steps to Reproduce
   
   1. Run `mqadmin skipAccumulatedMessage -g <group> -t %LMQ%<topic> -c 
<lmqParentTopic>` (or `-t rmq_sys_wheel_timer -c <clusterName>`) while 
`<group>` is offline.
   2. `resetOffsetByTimestamp` resolves the route via `clusterName` and 
receives `ResponseCode.CONSUMER_NOT_ONLINE`.
   3. The offline fallback calls `resetOffsetByTimestampOld(group, topic, -1, 
force)` with `clusterName = null`.
   
   ### What Did You Expect to See?
   
   The offline fallback calls 
`defaultMQAdminExt.resetOffsetByTimestampOld(clusterName, group, topic, 
timestamp, force)` so route resolution uses `clusterName`.
   
   ### What Did You See Instead?
   
   `clusterName` is discarded on the offline fallback path, breaking LMQ and 
`rmq_sys_wheel_timer` route resolution.
   


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