CAICAIIs commented on code in PR #3305:
URL: https://github.com/apache/dubbo-go/pull/3305#discussion_r3143752516


##########
cluster/router/tag/router.go:
##########
@@ -52,6 +57,14 @@ func (p *PriorityRouter) Route(invokers []base.Invoker, url 
*common.URL, invocat
                logger.Warnf("[tag router] invokers from previous router is 
empty")
                return invokers
        }
+
+       if p.cache != nil {
+               fullInvokers, pool := p.cache.FindAddrPoolWithInvokers(p)

Review Comment:
   这里为什么是用 fullInvokers 而不是当前传入的 invokers?invokers 代表前序 router 已经处理过的结果,而 
fullInvokers 是缓存里的全量快照,只用 len(invokers) == len(fullInvokers) 
作为条件应该是并不能保证两者顺序和内容一致。这样会导致 TagRouter 命中 cache 后,可能覆盖前序 router 的重排或其他等长变换结果



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