You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xiaoliu10 (via GitHub)" <gi...@apache.org> on 2023/10/11 06:58:53 UTC

[I] 一个微服务同时使用直连和注册中心模式调用同一个生产者服务, 直连会被注册中心的bean覆盖 [dubbo]

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

   <!-- 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.
   
   ## Ask your question here
   dubbo: 2.6.12
   springboot: 2.0.3
   因修复漏洞, 从2.6.2 -> 2.6.12
    项目中有这个需求, 部分请求需要转网处理, 测试下来感觉是因为bean初始化的时候: 
   ReferenceAnnotationBeanPostProcessor#buildReferenceBean
   中cache KEY的拼接方式由 reference.url() + "/" + interfaceName +
                   "/" + reference.version() +
                   "/" + reference.group();
   2.6.12 改为:
   ServiceBeanNameBuilder :
    StringBuilder beanNameBuilder = new StringBuilder("ServiceBean").append(SEPARATOR);
           // Required
           append(beanNameBuilder, interfaceClassName);
           // Optional
           append(beanNameBuilder, version);
           append(beanNameBuilder, group);
           // Build and remove last ":"
           String rawBeanName = beanNameBuilder.substring(0, beanNameBuilder.length() - 1);
   
   如果在部分消费者上只改变url的话就会因为beanName 一样被覆盖掉。
   配置group version 好像是可以的, 但是对于生产者而言group和version 都是一样的, 只是网络环境不一样
   
   所以我设置一个不同的interfaceName 也可以, interfaceName配置后 测试环境测试是可以转网了
   这里的话interfaceName 如果自定义的话要对每个需要使用直连消费者服务设置不同的值 不然会导致因为interfaceName重复覆盖, 也是一件麻烦的事情.
   


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


Re: [I] 一个微服务同时使用直连和注册中心模式调用同一个生产者服务, 直连会被注册中心的bean覆盖 [dubbo]

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

   Please test on 3.2.x. 2.6.x is EOL now.


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


Re: [I] Reference override question [dubbo]

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

   > 但是我如果从2.6.2 -> 3.2.x 版本跨度太大了 我希望能有个中间版本过渡一下, 等明年项目重构的时候再做一次大的版本升级 @AlbumenJ
   
   如果只是为了临时修复这个问题建议自行内部修复打包,2.6.x ~ 3.2.x 中间选择任何一个版本都是一个大升级,既然要做建议直接一步到位成本和拆开是一样的,否则临时修复即可


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


Re: [I] Reference override question [dubbo]

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

   但是我如果从2.6.2 -> 3.2.x 版本跨度太大了 我希望能有个中间版本过渡一下, 等明年项目重构的时候再做一次大的版本升级 @AlbumenJ 


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


Re: [I] Reference override question [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #13183: Reference override question
URL: https://github.com/apache/dubbo/issues/13183


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


Re: [I] Reference override question [dubbo]

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

   3.2.x 这里改成所有注解信息都参与拼接缓存key了 是可以的
   但是2.6.X我看了 逻辑是一样的从2.6.5开始就是这样了 也没有改动过


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


Re: [I] Reference override question [dubbo]

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

   No news is good news. Please feel free to create a new issue if you have any question.
   
   


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


Re: [I] Reference override question [dubbo]

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

   @AlbumenJ 


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