AlexStocks commented on code in PR #3706:
URL: https://github.com/apache/dubbo-go/pull/3706#discussion_r3883684187
##########
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] 生产 dispatch 已接入,但回归测试仍绕过真正的 Refer/Invoker 入口
当前 gRPC unary 代码已经能按 `UnaryFastPath` 选择 `unaryFastPathCall`,但新增的所谓
public-entry 测试仍直接调用未导出的 `newClientManager` 和 `cm.callUnary`,没有经过
`TripleProtocol.Refer` 的 Invoker 选择、`NewTripleInvoker` 创建以及
`TripleInvoker.Invoke` 对 invocation、metadata、attachment 和 context 的生产转换。即使真实
Reference 入口以后重新走到其他 Invoker、没有把全局 `TripleConfig` 挂到 URL,或 `Invoke` 不再调用该
manager,这个测试仍会全绿。请从 `TripleProtocol.Refer` 获取实际 Invoker 后发起 unary 调用,继续用服务端观察到的
`Content-Length` 区分 fast/duplex,并用断开 `grpcClient.NewConn` fast 分支的 mutant
证明用例会失败。
--
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]