You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/10/24 03:35:14 UTC

[GitHub] [dubbo] wangshuaipei opened a new issue, #10804: 不同版本超时时间的兼容问题

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

   旧com.alibaba.dubbo版本:2.5.9
   新org.apache.dubbo版本:2.7.17
   
   问题:旧的dubbo中设置过期时间放在字段default.timeout中,但是新的版本是在timeout中直接取值,会导致在旧的版本中设置的超时时间无效
   ![image](https://user-images.githubusercontent.com/41528403/197443590-266cb768-b499-4a72-9a26-a78937575ee0.png)
   ![image](https://user-images.githubusercontent.com/41528403/197443452-677a7f06-f0dc-484b-bc4a-4a9eb97d4b70.png)
   这样的情况该如何兼容?
   


-- 
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] zzh820364599 commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
zzh820364599 commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1321353992

   Too powerful


-- 
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 closed issue #10804: 不同版本超时时间的兼容问题

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #10804: 不同版本超时时间的兼容问题
URL: https://github.com/apache/dubbo/issues/10804


-- 
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] githublaohu commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
githublaohu commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1318471096

   旧版本作为消费者,新版本作为生产者的情况下,就旧版本设置超时时间'default.timeout',新版本取不到'default.timeout',只能取'timeout' 是这样吗?


-- 
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] wangshuaipei commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
wangshuaipei commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1288435503

   > org/apache/dubbo/common/URLStrParser.java:300
   > 
   > ```java
   >             // compatible with lower versions registering "default." keys
   >             if (name.startsWith(DEFAULT_KEY_PREFIX)) {
   >                 params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);
   >             }
   > ```
   > 
   > 这里会自动替换
   
   我看了一下这里的代码,好像是zk作为注册中心才会去执行,我们的注册中心是nacos,这里的代码没有执行到


-- 
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] tiancaipei commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
tiancaipei commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1319608403

   > @tiancaipei 3.1.2是否存在这个问题?
   
   我尝试了一下,还是存在这个问题的
   ![企业微信截图_16687532815561](https://user-images.githubusercontent.com/41528403/202637186-e37c09cd-d912-481f-848c-4c9960fc396a.png)
   ![企业微信截图_16687532541250](https://user-images.githubusercontent.com/41528403/202637202-3bafaccb-dc7c-4cc5-a703-41ff40711ed8.png)
   ![企业微信截图_16687533793393](https://user-images.githubusercontent.com/41528403/202637230-52aec6f2-3df8-4a7b-afbb-257d7856548e.png)
   ![企业微信截图_16687533702744](https://user-images.githubusercontent.com/41528403/202637238-26b63015-da60-4471-aab3-398f41e1f549.png)
   ![企业微信截图_16687531413426](https://user-images.githubusercontent.com/41528403/202637251-967453d5-ece2-4803-bf25-3b48a06debb0.png)
   
   
   


-- 
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] aamingaa commented on issue #10804: 不同版本超时时间的兼容问题

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

   look at this: https://github.com/apache/dubbo/pull/11385


-- 
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] tiancaipei commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
tiancaipei commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1319614833

   我通过如下方法解决了问题,不使用全局的默认超时时间,针对每个接口设置超时时间 @Service(version = "1.0", timeout = 1000),接口级的超时时间字段就是timeout,两个版本可以兼容


-- 
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] CrazyHZM commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1318171171

   @tiancaipei 3.1.2是否存在这个问题?


-- 
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] githublaohu commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
githublaohu commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1319411550

   > > org/apache/dubbo/common/URLStrParser.java:300
   > > ```java
   > >             // compatible with lower versions registering "default." keys
   > >             if (name.startsWith(DEFAULT_KEY_PREFIX)) {
   > >                 params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);
   > >             }
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > 这里会自动替换
   > 
   > 我看了一下这里的代码,好像是zk作为注册中心才会去执行,我们的注册中心是nacos,这里的代码没有执行到
   
   请问下在'ZookeeperRegistry'的哪行代码调用的?


-- 
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] tiancaipei commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
tiancaipei commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1319509038

   > > > org/apache/dubbo/common/URLStrParser.java:300
   > > > ```java
   > > >             // compatible with lower versions registering "default." keys
   > > >             if (name.startsWith(DEFAULT_KEY_PREFIX)) {
   > > >                 params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);
   > > >             }
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > 这里会自动替换
   > > 
   > > 
   > > 我看了一下这里的代码,好像是zk作为注册中心才会去执行,我们的注册中心是nacos,这里的代码没有执行到
   > 
   > 请问下在'ZookeeperRegistry'的哪行代码调用的?
   
   org.apache.dubbo.registry.zookeeper.ZookeeperRegistry#toUrlsWithoutEmpty


-- 
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 #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1288416585

   org/apache/dubbo/common/URLStrParser.java:300
   ```java
               // compatible with lower versions registering "default." keys
               if (name.startsWith(DEFAULT_KEY_PREFIX)) {
                   params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);
               }
   ```
   
   这里会自动替换


-- 
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] tiancaipei commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
tiancaipei commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1319508732

   > > > org/apache/dubbo/common/URLStrParser.java:300
   > > > ```java
   > > >             // compatible with lower versions registering "default." keys
   > > >             if (name.startsWith(DEFAULT_KEY_PREFIX)) {
   > > >                 params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);
   > > >             }
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > 这里会自动替换
   > > 
   > > 
   > > 我看了一下这里的代码,好像是zk作为注册中心才会去执行,我们的注册中心是nacos,这里的代码没有执行到
   > 
   > 请问下在'ZookeeperRegistry'的哪行代码调用的?
   
   params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);


-- 
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] tiancaipei commented on issue #10804: 不同版本超时时间的兼容问题

Posted by GitBox <gi...@apache.org>.
tiancaipei commented on issue #10804:
URL: https://github.com/apache/dubbo/issues/10804#issuecomment-1319508563

   > ```java
   > params.putIfAbsent(name.substring(DEFAULT_KEY_PREFIX.length()), value);
   > ```
   
   org.apache.dubbo.registry.zookeeper.ZookeeperRegistry#toUrlsWithoutEmpty


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