EmptyCity-111 commented on code in PR #3613:
URL: https://github.com/apache/dubbo-go/pull/3613#discussion_r3742831063


##########
global/protocol_config.go:
##########
@@ -31,20 +31,6 @@ type ProtocolConfig struct {
        Params any `yaml:"params" json:"params,omitempty" property:"params"`
 
        TripleConfig *TripleConfig `yaml:"triple" json:"triple,omitempty" 
property:"triple"`
-
-       // TODO: remove MaxServerSendMsgSize and MaxServerRecvMsgSize when 
version 4.0.0
-       //
-       // MaxServerSendMsgSize max size of server send message, 
1mb=1000kb=1000000b 1mib=1024kb=1048576b.
-       // more detail to see 
https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants
-       //
-       // Deprecated: use 
"ClientProtocolConfig.TripleConfig.MaxServerSendMsgSize" or in config tag 
"protocol_config/triple/max-server-send-msg-size" instead
-       MaxServerSendMsgSize string `yaml:"max-server-send-msg-size" 
json:"max-server-send-msg-size,omitempty"`

Review Comment:
   收到,这个点确实是我第一版考虑不周:v3 里直接删除公开字段会让现有 struct literal 在没有迁移窗口的情况下编译失败。
   
   我在 3b4437ef 里做了兼容修正:
   - 保留两个 deprecated 字段到 v4;
   - 初始化时采用「nested 非空值优先,否则迁移 legacy 值」;
   - Clone 和 JSON schema 同步保留旧入口;
   - 补了 external package struct literal、旧 YAML、默认值以及新旧值优先级测试。
   
   本地 `go test . ./global ./server -count=1`、`go test ./... -count=1` 和 
golangci-lint 都通过。感谢指出这个兼容性风险。



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