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


##########
cluster/router/polaris/router.go:
##########
@@ -188,6 +188,11 @@ func (p *polarisRouter) Route(invokers []base.Invoker, url 
*common.URL,
                }
        }
 
+       if len(ret) == 0 {

Review Comment:
   [P0] `len(ret)==0` 时直接回退到 `invokers` 会绕过真正生效的 Polaris 路由规则。`ret` 为空并不只代表“实例 
ID 映射不上”,也可能是路由规则故意把当前请求全部过滤掉;这时正确行为应该是返回空结果并让上层按“无可用 provider”处理,而不是把原始 
invokers 全部放回来继续发流量。现在的实现会把本应被路由规则拦掉的请求重新打到 provider 上,属于治理语义错误。



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