Alanxtl commented on PR #3320:
URL: https://github.com/apache/dubbo-go/pull/3320#issuecomment-4417551558

   删除最后同步后,`rcCompat.Init()` 产生的默认值不会回到 `InstanceOptions`。
   
   `options.go (line 117)` 到 `options.go (line 156)` 初始化的是 `rcCompat`,但 
`options.go (line 168)` 直接返回了。后续 `dubbo.go (line 138)` 的 `NewServer()` 克隆的是 
`ins.insOpts`,不是初始化后的 `rcCompat`。例如 YAML 里 `protocols.tri: {}` 
这种配置,`config.ProtocolConfig.Init()` 会把 `name=tri`、`port=50051` 补到 
`rcCompat`,但现在不会同步回 `global`;而 `server/options.go (line 76)` 的 server init 
也没有再给每个 protocol config 做 `defaults.Set`。结果 server 可能拿到空的 protocol name/port,和 
PR 前行为不一致。


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