You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/06 10:43:05 UTC

[GitHub] [dubbo] vio-lin opened a new issue #8695: org.apache.dubbo.remoting.exchange.support.DefaultFuture doWithCloseChannel will logRequestData

vio-lin opened a new issue #8695:
URL: https://github.com/apache/dubbo/issues/8695


   - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   - [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version:  2.7.14-SNAPSHOT
   * Operating System version: Win10
   * Java version: JDK8
   
   ### Actual Result
   打印出来的日志带有请求toString的内容
   ```
    public static void closeChannel(Channel channel) {
           for (Map.Entry<Long, Channel> entry : CHANNELS.entrySet()) {
               if (channel.equals(entry.getValue())) {
                   DefaultFuture future = getFuture(entry.getKey());
                   if (future != null && !future.isDone()) {
                       Response disconnectResponse = new Response(future.getId());
                       disconnectResponse.setStatus(Response.CHANNEL_INACTIVE);
                       disconnectResponse.setErrorMessage("Channel " +
                               channel +
                               " is inactive. Directly return the unFinished request : " +
                               // 这个方法会打印整个 request 对象toString的值
                               future.getRequest());
                       DefaultFuture.received(channel, disconnectResponse);
                   }
               }
           }
       }
   ```
   timeout打印的请求对象是不带有Request的
   ```
       private String getTimeoutMessage(boolean scan) {
           long nowTimestamp = System.currentTimeMillis();
           return (sent > 0 ? "Waiting server-side response timeout" : "Sending request timeout in client-side")
                   + (scan ? " by scan timer" : "") + ". start time: "
                   + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(start))) + ", end time: "
                   + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(nowTimestamp))) + ","
                   + (sent > 0 ? " client elapsed: " + (sent - start)
                   + " ms, server elapsed: " + (nowTimestamp - sent)
                   : " elapsed: " + (nowTimestamp - start)) + " ms, timeout: "
                   + timeout + " ms, request: " + (logger.isDebugEnabled() ? request : getRequestWithoutData()) + ", channel: " + channel.getLocalAddress()
                   + " -> " + channel.getRemoteAddress();
       }
   ```
   
   这个是漏加了吧 


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] wangchengming666 commented on issue #8695: org.apache.dubbo.remoting.exchange.support.DefaultFuture doWithCloseChannel will logRequestData

Posted by GitBox <gi...@apache.org>.
wangchengming666 commented on issue #8695:
URL: https://github.com/apache/dubbo/issues/8695#issuecomment-915690271


   I'll fix it later.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] horizonzy closed issue #8695: org.apache.dubbo.remoting.exchange.support.DefaultFuture doWithCloseChannel will logRequestData

Posted by GitBox <gi...@apache.org>.
horizonzy closed issue #8695:
URL: https://github.com/apache/dubbo/issues/8695


   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org