AlexStocks commented on code in PR #3232:
URL: https://github.com/apache/dubbo-go/pull/3232#discussion_r2902473553


##########
client/action.go:
##########
@@ -242,7 +242,7 @@ func processURL(ref *global.ReferenceConfig, regsCompat 
map[string]*config.Regis
                        }
                }
        } else { // use registry configs
-               urls = config.LoadRegistries(ref.RegistryIDs, regsCompat, 
common.CONSUMER)
+               urls = internal.LoadRegistries(ref.RegistryIDs, registries, 
common.CONSUMER)

Review Comment:
   原来 `config.LoadRegistries` 在 URL 构建失败时直接 panic(fail-fast)。新的 
`internal.LoadRegistries` 只打印 error log 然后 `continue`,静默丢弃配置错误的 registry。
   
   用户配置了错误的 registry address,服务启动成功但实际没连上 registry,服务发现静默失效,难以排查。
   
   建议:将 `continue` 改为返回 error 向上传播;或在所有 registry 均失败时返回错误而不是空列表。`processURL` 
签名已返回 `error`,可以直接传播。



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

Reply via email to