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


##########
cluster/router/tag/router.go:
##########
@@ -52,6 +57,16 @@ 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 {
+               if 
!invocation.GetAttributeWithDefaultValue(constant.RouterCacheDisable, 
false).(bool) {
+                       pool := p.cache.FindAddrPool(p)
+                       if pool != nil {
+                               return p.routeWithPool(p.cache.GetInvokers(), 
pool, url, invocation)
+                       }
+               }
+       }

Review Comment:
   Fixed: `FindAddrPool` now atomically returns both values under the same lock.



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