lexburner commented on issue #2419: Server side loadbalance problem URL: https://github.com/apache/incubator-dubbo/issues/2419#issuecomment-418232023 @freeseawind GOT it. ``` dubbo://172.19.6.139:20881/github.freeseawind.service.DemoService?anyhost=true&application=provider-test&dubbo=2.6.2&generic=false&interface=github.freeseawind.service.DemoService&loadbalance=random&methods=sayHello&pid=3527&side=provider&timeout=5000×tamp=1536031418472, dubbo://172.19.6.139:20881/github.freeseawind.service.DemoService?anyhost=true&application=provider-test&dubbo=2.6.2&generic=false&interface=github.freeseawind.service.DemoService&loadbalance=random&methods=sayHello&pid=3527&side=provider&timeout=5000×tamp=1536031419012 ``` notice the last attribute `timestamp` is different, it means that the two implementations both trigger the registry operation. So in the zookeeper, you can see two providers, while in the spring IOC context, it also has two implementations. The problem is that Dubbo invoker can not distinguish the two provider because their main attributes are the same. While dubbo try to find the ref in the Spring IOC context, one of the them is always selected. I think that it is dubbo user's responsibility to set enough info if two providers are exist in the same context. more details can reference the `com.alibaba.dubbo.config.spring.ServiceBean`. It implements `InitializingBean` and `ApplicationListener`, you can know the initialization process by debuging into two method `afterPropertiesSet()` and `onApplicationEvent()`.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
