This is an automated email from the ASF dual-hosted git repository.

szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new 89a597c85 RATIS-1956. Avoid built-in toString in NettyClientStreamRpc 
log (#980)
89a597c85 is described below

commit 89a597c85e96a6f282def4466aefc17016bb7558
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Dec 7 17:24:27 2023 +0100

    RATIS-1956. Avoid built-in toString in NettyClientStreamRpc log (#980)
---
 .../org/apache/ratis/netty/client/NettyClientStreamRpc.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java
 
b/ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java
index 17cb84aa7..020acc2fd 100644
--- 
a/ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java
+++ 
b/ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java
@@ -189,9 +189,9 @@ public class NettyClientStreamRpc implements 
DataStreamClientRpc {
             @Override
             public void operationComplete(ChannelFuture future) {
               if (!future.isSuccess()) {
-                scheduleReconnect(this + " failed", future.cause());
+                scheduleReconnect(Connection.this + " failed", future.cause());
               } else {
-                LOG.trace("{} succeed.", this);
+                LOG.trace("{} succeed.", Connection.this);
               }
             }
           });
@@ -323,16 +323,16 @@ public class NettyClientStreamRpc implements 
DataStreamClientRpc {
       @Override
       public void channelRead(ChannelHandlerContext ctx, Object msg) {
         if (!(msg instanceof DataStreamReply)) {
-          LOG.error("{}: unexpected message {}", this, msg.getClass());
+          LOG.error("{}: unexpected message {}", name, msg.getClass());
           return;
         }
         final DataStreamReply reply = (DataStreamReply) msg;
-        LOG.debug("{}: read {}", this, reply);
+        LOG.debug("{}: read {}", name, reply);
         final ClientInvocationId clientInvocationId = 
ClientInvocationId.valueOf(
             reply.getClientId(), reply.getStreamId());
         final NettyClientReplies.ReplyMap replyMap = 
replies.getReplyMap(clientInvocationId);
         if (replyMap == null) {
-          LOG.error("{}: {} replyMap not found for reply: {}", this, 
clientInvocationId, reply);
+          LOG.error("{}: {} replyMap not found for reply: {}", name, 
clientInvocationId, reply);
           return;
         }
 

Reply via email to