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


##########
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={}]",
+                        connectionId, socketAddress, err);
+            } else if (isNotification) {
+                // Do not include requestId into a throttling key as 
independent client requests may result in the same error.
+                String key = format("{}", connectionId);
+
+                throttledLogger.warn(key, "Error processing client 
notification [connectionId={}, id={}, remoteAddress={}]",
+                        connectionId, requestId, socketAddress, err);
+            } else {
+                // Do not include requestId into a throttling key as 
independent client requests may result in the same error.
+                String key = format("{}{}", connectionId, opCode);

Review Comment:
   Thanks. Fixed.



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