solveme commented on code in PR #7481:
URL: https://github.com/apache/ignite-3/pull/7481#discussion_r2740986681


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java:
##########
@@ -696,7 +705,36 @@ private void writeError(long requestId, int opCode, 
Throwable err, ChannelHandle
         }
     }
 
-    private void writeErrorCore(Throwable err, ClientMessagePacker packer) {
+    private void writeErrorCore(
+            Throwable err,
+            ClientMessagePacker packer,
+            long requestId,
+            ChannelHandlerContext ctx,
+            int opCode,
+            boolean isNotification,
+            boolean isHandshake
+    ) {
+        if (throttledLogger.isDebugEnabled() && shouldLogError(err)) {
+            SocketAddress socketAddress = ctx.channel().remoteAddress();
+
+            if (isHandshake) {
+                throttledLogger.warn("Error processing client handshake 
[connectionId={}, remoteAddress={}]",

Review Comment:
   Looks like this method line uses `IgniteThrottledLogger.warn(String msg, 
Object... params)`. Throwable `err` will be threated as message param. Should 
we use `IgniteThrottledLogger.warn(String msg, @Nullable Throwable th, 
Object... params)` instead?



##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java:
##########
@@ -696,7 +705,36 @@ private void writeError(long requestId, int opCode, 
Throwable err, ChannelHandle
         }
     }
 
-    private void writeErrorCore(Throwable err, ClientMessagePacker packer) {
+    private void writeErrorCore(
+            Throwable err,
+            ClientMessagePacker packer,
+            long requestId,
+            ChannelHandlerContext ctx,
+            int opCode,
+            boolean isNotification,
+            boolean isHandshake
+    ) {
+        if (throttledLogger.isDebugEnabled() && shouldLogError(err)) {
+            SocketAddress socketAddress = ctx.channel().remoteAddress();
+
+            if (isHandshake) {
+                throttledLogger.warn("Error processing client handshake 
[connectionId={}, remoteAddress={}]",

Review Comment:
   Looks like this line uses `IgniteThrottledLogger.warn(String msg, Object... 
params)`. Throwable `err` will be threated as message param. Should we use 
`IgniteThrottledLogger.warn(String msg, @Nullable Throwable th, Object... 
params)` instead?



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

Reply via email to