Aetherance commented on code in PR #3256:
URL: https://github.com/apache/dubbo-go/pull/3256#discussion_r2938215137


##########
cluster/router/chain/chain.go:
##########
@@ -109,9 +109,13 @@ func (c *RouterChain) copyRouters() 
[]router.PriorityRouter {
 // NewRouterChain init router chain
 // Loop routerFactories and call NewRouter method
 func NewRouterChain(url *common.URL) (*RouterChain, error) {
-       if url.SubURL != nil {
-               if appName := url.SubURL.GetParam(constant.ApplicationKey, ""); 
appName != "" {
-                       url.CompareAndSwapParam(constant.ApplicationKey, "", 
appName)
+       // Ensure application key exists in main URL before creating routers,
+       // as polaris router requires application name to be present.
+       if url.GetParam(constant.ApplicationKey, "") == "" {

Review Comment:
   这里只是在原来代码的基础上加了一层 url.GetParam(constant.ApplicationKey, "") 是否返回 "" 
的判断,并未引入实质性修复。建议参考 
https://github.com/apache/dubbo-go/issues/3151#issuecomment-4059291655 进行修复。



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