You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wegod (via GitHub)" <gi...@apache.org> on 2023/04/21 07:51:28 UTC

[GitHub] [dubbo] wegod opened a new issue, #12159: AbstractConfig中equals方法不比较id导致找不到registry

wegod opened a new issue, #12159:
URL: https://github.com/apache/dubbo/issues/12159

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.1.9
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. A和B两个项目client定义同样的registry内容,定义不同的id,A和B两个client中分别定义了几个consumer,使用不同的registry id
   2. C项目同时引用了A和B两个client,启动时就会报错找不到A或B其中一个registry
   3. 原因是AbstractConfigManager的165行判断value.equals(config)时,equals方法中不比较id。为什么要忽略id的对比?
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   如果没有其他特殊逻辑,equals比较id这个重要属性,允许不同项目配置相同内容而不同id的registry
   
   ### Actual Behavior
   
   ![image](https://user-images.githubusercontent.com/3276231/233576487-00e91b13-9713-47f3-bcf3-c1b556bb84a6.png)
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   
   ```
   Just put your stack trace here!
   ```
   


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12159: AbstractConfig中equals方法不比较id导致找不到registry

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12159:
URL: https://github.com/apache/dubbo/issues/12159#issuecomment-1521143491

   对于一些 Config(比如 Registry、Reference、Service)可以考虑判断 id


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12159: AbstractConfig中equals方法不比较id导致找不到registry

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12159:
URL: https://github.com/apache/dubbo/issues/12159#issuecomment-1521143185

   因为 id 在一些场景下是会自动生成的,导致 equals 不通过,因此出现配置一致性检查错误的情况。(主要是 ApplicationConfig 这种)


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org