AlexStocks commented on code in PR #3326:
URL: https://github.com/apache/dubbo-go/pull/3326#discussion_r3254210334


##########
protocol/jsonrpc/jsonrpc_protocol.go:
##########
@@ -80,18 +79,16 @@ func (jp *JsonrpcProtocol) Export(invoker base.Invoker) 
base.Exporter {
 
 // Refer a remote JSON PRC service from registry
 func (jp *JsonrpcProtocol) Refer(url *common.URL) base.Invoker {
-       // TODO: Temporary compatibility with old APIs, can be removed later
-       rt := config.GetConsumerConfig().RequestTimeout
+       rt := ""

Review Comment:
   [P0] 同样的问题这里又出现了一次:`global.DefaultConsumerConfig()` 
只会给出硬编码默认值,不会带上用户通过配置文件/配置中心加载的 `consumer.request-timeout`。结果是 JSON-RPC refer 
路径在 URL 未显式带 timeout 时会错误地退回 3s。建议沿用当前生效的 consumer 配置,并补一条覆盖全局 consumer timeout 
的测试。



##########
protocol/dubbo/dubbo_invoker.go:
##########
@@ -57,10 +56,9 @@ type DubboInvoker struct {
 
 // NewDubboInvoker constructor
 func NewDubboInvoker(url *common.URL, client *remoting.ExchangeClient) 
*DubboInvoker {
-       // TODO: Temporary compatibility with old APIs, can be removed later
-       rt := config.GetConsumerConfig().RequestTimeout
+       rt := ""

Review Comment:
   [P0] 这里把 fallback 从 `config.GetConsumerConfig()` 改成了 
`global.DefaultConsumerConfig()`,会直接绕过用户已经加载到 root config 里的 
`consumer.request-timeout`。只要 URL 上没有 `ConsumerConfigKey` attribute,这里就固定回退到 
3s,导致现有全局 consumer 超时配置失效。建议继续读取当前生效的 consumer 配置,只移除 legacy API 
兼容层,不要把全局配置旁路掉;同时补一条“仅配置 root consumer timeout 且 URL 无 attribute” 的回归测试。



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to