AlexStocks commented on code in PR #3706:
URL: https://github.com/apache/dubbo-go/pull/3706#discussion_r3878265880
##########
protocol/triple/client.go:
##########
@@ -181,6 +181,16 @@ func newClientManager(url *common.URL) (*clientManager,
error) {
}
cliOpts = append(cliOpts, clientKeepAliveOpts...)
+ // The unary fast path is on by default. It only applies to the Triple
+ // (connect) protocol; the client below defaults to the gRPC wire
format.
+ if tripleConf != nil {
+ if tripleConf.UnaryFastPath {
+ cliOpts = append(cliOpts, tri.WithUnaryFastPath())
Review Comment:
[P1] 这个开关没有进入实际 Dubbo Triple unary 生产路径
这里仅设置 `WithUnaryFastPath`,但当前 HTTP/2/HTTP/3 分支没有设置
`WithTriple()`;`tri.NewClient` 因而仍构造默认 `grpcClient`,而 `grpcClient.NewConn`
无论开关值都固定使用 `newDuplexHTTPCall`。唯一追加 `WithTriple()` 的 `CallHTTP` case 又不会被上方
`callProtocol` 的实际赋值命中。结果是默认 `UnaryFastPath=true` 对 `TripleProtocol.Refer ->
TripleInvoker.Invoke -> clientManager.callUnary` 无效,生产热路径仍使用 pipe 和请求
goroutine。现有 benchmark 显式传入 `WithTriple()`,其他测试直接构造 `tripleClient`,都覆盖不到这处
dispatch 断链。请在保持默认 gRPC wire 兼容的前提下把 fast path 接到真实 unary client,或把能力限制为低层
`WithTriple` client 并移除无效的全局配置;同时补从公开 Dubbo Triple unary 入口出发的回归测试。
--
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]