ycoe removed a comment on issue #8777:
URL: https://github.com/apache/dubbo/issues/8777#issuecomment-1010953695


   我也遇到类似的问题,这是我的debug结果:
   1. 在订阅阶段 
org.apache.dubbo.registry.nacos.NacosRegistry#doSubscribe(org.apache.dubbo.common.URL,
 org.apache.dubbo.registry.NotifyListener, java.util.Set<java.lang.String>) 
方法拿到了两个provider。然后循环处理
   
![image](https://user-images.githubusercontent.com/985424/149131549-e1ee4eed-22f6-41d3-a41d-a316d7c71e05.png)
   
   2. 
在org.apache.dubbo.rpc.cluster.directory.AbstractDirectory#setInvokers,将invokers设置进去在第二次进入此方法时,原来的this.invokers已经有一个值,但执行完后会直接覆盖,导致了后面执行时,invokers永远只有一个值。
   
![image](https://user-images.githubusercontent.com/985424/149132169-2adbb3b8-09c2-4a2d-9c58-209f0d138534.png)
   
   我查了下2.6.x版本的,注册流程不是这样的,应该是重构后的代码
   
   提了个PR: https://github.com/apache/dubbo/pull/9565/files


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