-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOFAArk module uninstall 报错,无法正常完成清理工作 #1321
Comments
@lvjing2 看了一下是因为BizUninstallEventHandler 执行了shutdownContext,这边要执行shutdownContext的原因是什么? |
@CrazyHZM BizUninstallEventHandler 是触发模块 application Context真正执行 close 操作的地方,模块卸载的真正操作就在这里面完成的 |
sofaboot 4的基座 + sofaboot 4的模块,就会发生这个问题 |
SOFAArk 模块卸载时是否能只触发 BeforeBizStopEvent,不要主动调用 applicationContext.close() 方法呢,在 com.alipay.sofa.runtime.spi.component.SofaRuntimeManager#shutDownExternally 的后续逻辑中会执行 applicationContext.close() |
@lvjing2 context的生命周期可以交给sofaboot管理,ark可以不关心context是什么阶段销毁的。看看主动执行shutdownContext是有什么特殊场景吗 |
sofaark 面向sofaboot 和 springboot等多种框架,如果这样,其他框架的模块就没有自动关闭的能力 |
同意,sofaboot这边需要再destroy的时候加强一下生命周期的管理,能够支持application context close时销毁相关对象。 |
Describe the bug
模块卸载时,会执行两个步骤:
com.alipay.sofa.boot.ark.handler.SofaBizUninstallEventHandler
,会执行清理操作,但是由于 SOFARuntime 已经在第一步里被删除了,所以这一步的清理实际上没有完成,而直接报错。To Reproduce
Steps to reproduce the behavior:
Expected behavior
无报错,正常卸载模块
Environment:
uname -a
): macThe text was updated successfully, but these errors were encountered: