RockteMQ-AI commented on issue #11381:
URL: https://github.com/apache/rocketmq/issues/11381#issuecomment-6127944129

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase 
(`develop@9ea2ccdc`).
   
   **Root Cause:**
   
   Three distinct bugs in `UpdateStaticTopicSubCommand` and 
`RemappingStaticTopicSubCommand`:
   
   1. **Option key mismatch** — `-mf/--mapFile` is registered under key `"mf"` 
(line 77) but the code reads key `'f'` via `commandLine.getOptionValue('f')` 
(line 98) and `commandLine.hasOption("f")` (line 130). The `-mf` flag is 
silently parsed and discarded; the file path is never read.
   
   2. **File mode unreachable** — Even if the key were corrected, the 
`OptionGroup("-b", "-c")` is `setRequired(true)` and `-qn/--totalQueueNum` is 
also required, so `mqadmin updateStaticTopic -t T -mf plan.json` fails at parse 
time. The file mode is designed to source these from the mapping file, making 
the required-option constraint incorrect for that path.
   
   3. **`-fr/--forceReplace` ignored** — In 
`UpdateStaticTopicSubCommand.executeFromFile()`, the `force` variable is 
correctly computed from the CLI flag (lines 104-106), but then 
`MQAdminUtils.updateTopicConfigMappingAll(...)` is called with a hardcoded 
`false` literal (line 112) instead of the `force` variable.
   
   **Impact:** `mqadmin` static-topic management commands (`updateStaticTopic`, 
`remappingStaticTopic`) — operators cannot supply a precomputed mapping file, 
and force-replace is silently ignored.
   
   **Severity:** Medium — affects admin tooling correctness; data plane is 
unaffected.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*
   


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