alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.33k stars 12.85k forks source link

if RpcClient.request() method request timout, so retryTimes param will be invalid. #12701

Open XiaZhouxx opened 1 month ago

XiaZhouxx commented 1 month ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

XiaZhouxx commented 1 month ago
image

这里的判断是判定while逻辑整体超时, 但Connection.request内部才是真正的请求超时, 这里应该只需要感知错误然后重试。

KomachiSion commented 1 month ago

我理解这里不需要修改, 因为timeout是由外部传入的, 也就是预期这次调用最大的超时时间,而不是单次重试的超时时间。

XiaZhouxx commented 1 month ago

主要这里我基于官方文档理解这两个参数应该是控制的grpc请求的超时/重试, 并不是调用这个方法的最大超时时间

image
KomachiSion commented 1 month ago

@shiyiyue1102 一起看一下, 这个超时时间应该是整体的还是单次的?