Alanxtl commented on code in PR #3029:
URL: https://github.com/apache/dubbo-go/pull/3029#discussion_r2508697392
##########
cluster/router/affinity/router.go:
##########
@@ -85,13 +84,7 @@ type ApplicationAffinityRoute struct {
func newApplicationAffinityRouter(url *common.URL) *ApplicationAffinityRoute {
- application, ok := url.GetAttribute(constant.ApplicationKey)
- if !ok {
- logger.Warnf("ApplicationAffinityRoute url does not have
application attribute, url=%s", url)
- return nil
- }
-
- applicationName := application.(global.ApplicationConfig).Name
+ applicationName := url.GetParam(constant.ApplicationKey, "")
Review Comment:
这里为什么不需要在applicationName 为""的时候return
##########
cluster/router/polaris/router.go:
##########
@@ -78,6 +89,10 @@ type polarisRouter struct {
routerAPI polaris.RouterAPI
consumerAPI polaris.ConsumerAPI
+
+ // config change: config to global
+ currentApplication string
+ Registries map[string]*global.RegistryConfig
Review Comment:
这里和下面的getService函数会不会有并发冲突的问题呀
--
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]