-
Notifications
You must be signed in to change notification settings - Fork 26.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get wrong default protocolConfig from another service. #4775
Comments
Can you provide a demo ? I test but didn't reproduce the problem. |
@tswstarplanet I can reproduce this issue with the following config: |
Here is the demo for you, https://github.com/haiyang1985/dubbo-demo-config. |
I check the code, it's because when you export the DemoService2, the protocol is stored in ConfigManager as a "default" protocol, and when the DemoService is exported, the "default" protocol will be set to it. |
@tswstarplanet yes. |
这个问题其实我感觉有点麻烦,因为目前dubbo的逻辑是如果一个protocol被添加到ConfigManager中时,如果没有设置id,default没有显式设置为false,那它保存的key就是default。所以上面把设置的protocol设置为default是合逻辑的。 |
@tswstarplanet 这点和之前的默认逻辑相反,可能导致老用户配置的未指定default=true的protocol无法生效 |
这个问题在 cloud-native 尝试做了解决,setProtocol 不再向 ConfigManager 保存全局实例。 |
Environment
Steps to reproduce this issue
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
XML service's port should in default 20880.
Actual Result
XML service's port is 20770, and iothreds is 2.
The text was updated successfully, but these errors were encountered: