krashouk opened a new issue, #1890:
URL: https://github.com/apache/rocketmq-dashboard/issues/1890

   ## 问题描述
   
   `ClusterInfoService` 创建了单线程 `ScheduledExecutorService` 
用于刷新集群缓存,但没有任何销毁回调。Spring 应用上下文关闭后,该非守护调度线程仍可能存活,导致测试上下文、热重载或进程优雅退出被延迟。
   
   ## 复现步骤
   
   1. 创建并初始化 `ClusterInfoService`。
   2. 关闭其所属 Spring 上下文。
   3. 检查内部 scheduler,当前没有生命周期方法调用 `shutdown`。
   
   ## 预期行为
   
   Bean 销毁时停止调度器,不再接受新任务;正常关闭无需强制中断正在执行的刷新。
   
   ## 环境
   
   - 分支:`master`
   - 基线:`770822bbc812bfd0c2a94aa0128ab6f59b50d076`
   - JDK:17
   
   ## 建议修复方向
   
   增加 Jakarta `@PreDestroy` 生命周期方法调用 `scheduler.shutdown()`,并用轻量单元测试验证调度器状态。


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