Skip to content
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

Dubbo 2.7.12 consumer没有配置retries时,没有使用provider配置的retries #8325

Closed
2 tasks done
zrlw opened this issue Jul 20, 2021 · 5 comments
Closed
2 tasks done
Labels
help wanted Everything needs help from contributors type/bug Bugs to being fixed

Comments

@zrlw
Copy link
Contributor

zrlw commented Jul 20, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.12
  • Operating System version: centos 7
  • Java version: 1.8

Steps to reproduce this issue

provider的springboot工程application.yml配置了dubbo.provider.retries=0,
consumer的springboot工程application.yml没有配置dubbo.consumer.retries

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?
consumer调用provider失败时不自动重发。

Actual Result

What actually happens?
consumer调用provider超时自动重试。

@zhangyz-hd
Copy link
Contributor

PS:

  1. 2.5.10、2.6.10无此问题
  2. 2.7.12下,dubbo.provider.cluster=failfast也是同样

原因:2.7下org.apache.dubbo.registry.integration.RegistryDirectory#mergeUrl中,将提供者参数合并到overrideDirectoryUrl的代码被去掉了。


撇开问题本身,这里其实有点尴尬的,因为retries、cluster更像是对一个服务所有提供者维度的,而不是针对一个服务具体某个提供者维度的参数。比如,一个10个提供者,它们注册的retries、cluster值不同。。

@CrazyHZM CrazyHZM added help wanted Everything needs help from contributors type/bug Bugs to being fixed version/2.7.x labels Sep 23, 2021
@chickenlj
Copy link
Contributor

PS:

  1. 2.5.10、2.6.10无此问题
  2. 2.7.12下,dubbo.provider.cluster=failfast也是同样

原因:2.7下org.apache.dubbo.registry.integration.RegistryDirectory#mergeUrl中,将提供者参数合并到overrideDirectoryUrl的代码被去掉了。

撇开问题本身,这里其实有点尴尬的,因为retries、cluster更像是对一个服务所有提供者维度的,而不是针对一个服务具体某个提供者维度的参数。比如,一个10个提供者,它们注册的retries、cluster值不同。。

我认为我们应该对能支持的场景做一些限制,不太可能无限的对所有可能的部署场景都提供支持。比如 一个10个提供者,它们注册的retries、cluster值不同 这种情形在 registryes应该就不能被支持,因为 retries 在框架中是工作在 ClusterInvoker - 也就是集群层面。

@chickenlj
Copy link
Contributor

image

OverrideDirectoryUrl其实是完全工作在消费端,不应该感知到后端 Invoker 具体的provider示例层面的配置;当前是随机选取了一个 provider 的 retries 配置覆盖到了集群上

@CrazyHZM
Copy link
Member

Resolved ini #9147

@wuwen5
Copy link
Contributor

wuwen5 commented Jan 18, 2022

@chickenlj 会影响到 #6426 问题吗 ? 2.7.6及后续版本中标签路由(TagRouter)行为不符合预期的问题

经过 org.apache.dubbo.registry.integration.RegistryDirectory#mergeUrl 方法的处理之后,程序会把provider端的tag注入到属性 this.overrideDirectoryUrl中,因此 getConsumerUrl 方法返回的URL中就有了 tag 信息
请问这个问题是否会被修正呢?还是我们的用法不对?

升级2.7.15后发现 又重现 #6426 的问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Everything needs help from contributors type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

5 participants