You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ferrirW (via GitHub)" <gi...@apache.org> on 2023/05/15 07:13:22 UTC

[GitHub] [rocketmq] ferrirW commented on a diff in pull request #6750: [ISSUE #6748]Optimize NettyRemotingAbstract#writeResponse log print

ferrirW commented on code in PR #6750:
URL: https://github.com/apache/rocketmq/pull/6750#discussion_r1193414744


##########
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:
##########
@@ -216,10 +216,7 @@ public static void writeResponse(Channel channel, RemotingCommand request, @Null
         response.markResponseType();
         try {
             channel.writeAndFlush(response).addListener((ChannelFutureListener) future -> {
-                if (future.isSuccess()) {
-                    log.debug("Response[request code: {}, response code: {}, opaque: {}] is written to channel{}",
-                        request.getCode(), response.getCode(), response.getOpaque(), channel);

Review Comment:
   It looks like the problem is the string concatenation, add log.isDebugEnabled should reduce the affect on performance.



-- 
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: commits-unsubscribe@rocketmq.apache.org

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