AlexStocks commented on code in PR #3216:
URL: https://github.com/apache/dubbo-go/pull/3216#discussion_r2819973719
##########
cluster/router/chain/chain.go:
##########
@@ -108,6 +109,14 @@ 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.GetParam(constant.ApplicationKey, "") == "" {
Review Comment:
这里整个过程需要加上锁吧?
假设gr1 在 line 112这里获取的值为空,运行到 line114 的时候,另外一个 gr2 在 line 112 也获取为空后进入了这 if
条件,进而导致两个 gr 竞争进行 SetParam,这就不对了吧?
--
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]