AlexStocks commented on code in PR #994:
URL: https://github.com/apache/dubbo-go-pixiu/pull/994#discussion_r3563652663
##########
pkg/config/xds/xds.go:
##########
@@ -116,8 +126,13 @@ func (a *Xds) Start() {
// lds fetch just run on init phase.
if a.dynamicResourceMg.GetLds() != nil {
+ discoverApi := a.createApiManager(a.dynamicResourceMg.GetLds(),
a.dynamicResourceMg.GetNode(), constant.ListenerType)
+ if discoverApi == nil {
+ logger.Errorf("failed to create LDS API manager")
+ return
Review Comment:
[P0] 这里把原来的 panic 改成日志后直接返回,但 `Xds.Start()` 没有错误返回值,调用它的
AdapterManager/Server 会继续完成启动并向外表现为成功;此时 LDS 未启动,且这里还会跳过后续 CDS 初始化。配置缺失或 xDS
连接失败会因此变成“进程存活但动态 listener/cluster 全部不可用”的假健康状态。应把错误沿 `Xds.Start →
AdapterManager.Start → Server.Start → CLI` 传播并让启动返回非零;如果 LDS/CDS
被设计为可独立降级,也必须分别继续初始化并显式暴露 degraded 状态,不能静默成功。第 147 行的 CDS 分支存在同样问题。
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]