yuluo-yx opened a new pull request, #4450:
URL: https://github.com/apache/rocketmq-dashboard/pull/4450

   <!-- Make sure the base branch is `master`: that is the RocketMQ Studio 
trunk. -->
   
   ### Which Issue(s) This PR Fixes
   
   - Fixes #4449
   - Replaces #4149, closed by the branch switch in #4379.
   
   ### Brief Description
   
   This is a resubmission of #4149 against `master`, following the branch 
switch notice in #4379. The fork branch is unchanged; `master` is now the 
RocketMQ Studio trunk.
   
   Topic 删除或 CommitLog 保留清理后,Broker 可能仍有需要维护的队列存储。现有界面缺少原生队列清理入口,本 PR 把无用 Topic 
队列与过期 ConsumeQueue 清理整合为单节点维护流程,包含范围审阅、明确确认、审计和不确定结果处理。
   
   ## 改动说明
   
   - GET 读取所选实例中已登记节点的当前 Topic 配置列表;POST 要求操作类型、已审阅的 Topic 
集合和完整节点地址确认。提交前重新核对节点登记和 Topic 名称集合,变化时阻止执行。
   - 两种操作分别调用 cleanUnusedTopicByAddr 与 
cleanExpiredConsumerQueueByAddr,只针对一个登记节点,不使用集群级遍历接口。
   - 原生 API 没有 dry run、删除清单或回收字节数。UI 明确区分配置保留集合与删除候选,不伪造清理收益;成功响应显示 
BROKER_REPORTED_COMPLETION,超时或异常显示 UNKNOWN,不自动重试。
   - 切换清理类型清除范围与确认;执行期间锁定关闭和编辑,实例切换后丢弃迟到结果。中文文档说明备份、维护窗口、并发变化、不可撤销删除及恢复边界。
   
   
协议依据:[DefaultMessageStore.cleanUnusedTopic](https://github.com/apache/rocketmq/blob/rocketmq-all-5.5.0/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java#L1608)
 按配置保留集合删除无用队列,默认实现排除系统 
Topic/LMQ;[ConsumeQueueStore.cleanExpired](https://github.com/apache/rocketmq/blob/rocketmq-all-5.5.0/store/src/main/java/org/apache/rocketmq/store/queue/ConsumeQueueStore.java#L558)
 按 CommitLog 最小物理位点清理完全过期队列,可能涉及仍配置的 Topic。没有手工删除 CommitLog 的调用。
   
   ### How Did You Test This Change?
   
   ## 原提交验证记录
   
   本地后端 63 项、前端 23 项测试通过;新增服务 46/46 行、30/34 分支覆盖。Checkstyle、TypeScript/Vite 
构建、后端打包通过,ESLint 0 错误、10 条现有告警。浏览器同一脚本明确拦截本地 
GET/POST,验证节点、配置列表、确认文本、操作类型及完成回执,没有删除真实 Broker 
文件。一次前端测试运行出现异常长耗时和超时,未改超时阈值,单独复跑 6 项弹窗测试通过。
   
   ## 兼容性与回滚
   
   无新增依赖或数据库迁移,撤销代码提交可移除入口与接口;已删除数据必须依靠事先验证的备份恢复,撤销代码或重建 Topic 
都不能恢复数据。真实存储清理、备份恢复演练、压力、容量和网络分区测试未执行。既有全量测试与依赖审计缺口继续记录。提交含 [skip 
ci],未运行远端工作流。核验日期:2026-09-08。
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / 
`refactor:` / `chore:` / `docs:` / `perf:`)
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under 
`web/src/i18n/`, or the change does not add UI text
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks), or the original verification scope is stated above
   - [x] New source files carry the ASF license header, or no new source files 
were added
   - [x] Documentation touched where behaviour changed (README / `docs/` / 
in-app help), or no documentation change was required
   


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