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


##########
go.mod:
##########
@@ -10,7 +10,6 @@ require (
        github.com/apache/dubbo-getty v1.4.10
        github.com/apache/dubbo-go-hessian2 v1.12.5

Review Comment:
   ## go.mod - 依赖变更需要确认
   
   cenkalti/backoff/v4 从 require 段移动到了 
indirect。这可能意味着这个依赖现在是通过其他模块间接引入的,而不是直接被新代码导入。
   
   **建议**: 确认这个依赖确实只是间接依赖,或者将新代码中对 backoff 的导入声明为直接依赖。



##########
protocol/triple/triple.go:
##########
@@ -139,14 +167,23 @@ func (tp *TripleProtocol) Refer(url *common.URL) 
base.Invoker {
 func (tp *TripleProtocol) Destroy() {
        logger.Infof("TripleProtocol destroy.")
 
+       for _, server := range tp.drainServers() {
+               tripleServerGracefulStop(server)
+       }
+
+       tp.BaseProtocol.Destroy()
+}
+
+func (tp *TripleProtocol) drainServers() []*Server {
        tp.serverLock.Lock()
        defer tp.serverLock.Unlock()
+

Review Comment:
   ## Triple 协议支持缺失
   
   从 diff 看,gRPC 协议实现了 GracefulShutdownCallback 并使用 health check 进行关闭通知,但 
Triple 协议没有相应的实现。这可能导致在使用 Triple 协议时优雅关闭功能不完整。
   
   **建议**: 确认 Triple 协议是否需要相同的实现,或在文档中说明只支持 gRPC。



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