Snow-kal commented on code in PR #3643:
URL: https://github.com/apache/dubbo-go/pull/3643#discussion_r3758795454


##########
protocol/triple/client.go:
##########
@@ -296,29 +297,27 @@ func (cm *clientManager) callHealthWatch(ctx 
context.Context, service string) (*
        return stream, nil
 }
 
-func genKeepAliveOptions(url *common.URL, tripleConf *global.TripleConfig) 
([]tri.ClientOption, time.Duration, time.Duration, error) {
-       var cliKeepAliveOpts []tri.ClientOption
+func resolveClientKeepAliveOptions(url *common.URL, tripleConf 
*global.TripleConfig) ([]tri.ClientOption, time.Duration, time.Duration, error) 
{
+       var clientKeepAliveOpts []tri.ClientOption
 
-       // Set max send and recv msg size
+       // Apply client message-size limits from URL compatibility parameters.
        maxCallRecvMsgSize := constant.DefaultMaxCallRecvMsgSize
        if recvMsgSize, err := 
humanize.ParseBytes(url.GetParam(constant.MaxCallRecvMsgSize, "")); err == nil 
&& recvMsgSize > 0 {
                maxCallRecvMsgSize = int(recvMsgSize)
        }
-       cliKeepAliveOpts = append(cliKeepAliveOpts, 
tri.WithReadMaxBytes(maxCallRecvMsgSize))
+       clientKeepAliveOpts = append(clientKeepAliveOpts, 
tri.WithReadMaxBytes(maxCallRecvMsgSize))
        maxCallSendMsgSize := constant.DefaultMaxCallSendMsgSize
        if sendMsgSize, err := 
humanize.ParseBytes(url.GetParam(constant.MaxCallSendMsgSize, "")); err == nil 
&& sendMsgSize > 0 {
                maxCallSendMsgSize = int(sendMsgSize)
        }
-       cliKeepAliveOpts = append(cliKeepAliveOpts, 
tri.WithSendMaxBytes(maxCallSendMsgSize))
+       clientKeepAliveOpts = append(clientKeepAliveOpts, 
tri.WithSendMaxBytes(maxCallSendMsgSize))
 
-       // Set keepalive interval and keepalive timeout
-       // Compatibility: read the legacy URL keepalive parameters.
-       // TODO: remove KeepAliveInterval and KeepAliveTimeout in version 4.0.0.

Review Comment:
   感谢建议 已经恢复



##########
protocol/triple/server.go:
##########
@@ -549,12 +547,11 @@ func (s *Server) registerUnaryMethodHandler(procedure 
string, m common.MethodInf
                func(ctx context.Context, req *tri.Request) (*tri.Response, 
error) {
                        args := extractUnaryInvocationArgs(req.Msg)
                        attachments := generateAttachments(req.Header())
-                       // Inject attachments
+                       // Make incoming attachments available to invocation 
filters and user code.
                        ctx = context.WithValue(ctx, constant.AttachmentKey, 
attachments)
                        invo := invocation.NewRPCInvocation(m.Name, args, 
attachments)
                        res := invoker.Invoke(ctx, invo)
-                       // TODO(DMwangnima): modify InfoInvoker to get a 
unified processing logic
-                       // Please refer to server/InfoInvoker.Invoke()

Review Comment:
   感谢建议 已经恢复



##########
protocol/triple/server.go:
##########
@@ -685,7 +682,8 @@ func (s *Server) saveServiceInfo(interfaceName string, info 
*common.ServiceInfo,
        ret.Metadata = info
        s.mu.Lock()
        defer s.mu.Unlock()
-       // TODO(DMwangnima): using interfaceName is not enough, we need to 
consider group and version

Review Comment:
   感谢建议 已经恢复



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