smiklosovic commented on code in PR #3018:
URL: https://github.com/apache/cassandra/pull/3018#discussion_r1453096589


##########
src/java/org/apache/cassandra/transport/ExceptionHandlers.java:
##########
@@ -133,6 +136,15 @@ else if (Throwables.anyCauseMatches(cause, t -> t 
instanceof Errors.NativeIoExce
             ClientMetrics.instance.markUnknownException();
             logger.trace("Native exception in client networking", cause);
         }
+        else if (Throwables.anyCauseMatches(cause, t -> t instanceof 
SSLHandshakeException))
+        {
+            ClientMetrics.instance.markSSLHandshakeException();
+            NoSpamLogger.log(logger, NoSpamLogger.Level.WARN, 1, 
TimeUnit.MINUTES, "SSLHandshakeException in client networking with peer {} {}", 
clientAddress, cause.getMessage());
+        }
+        else if (Throwables.anyCauseMatches(cause, t -> t instanceof 
SSLException))
+        {
+            NoSpamLogger.log(logger, NoSpamLogger.Level.WARN, 1, 
TimeUnit.MINUTES, "SSLException in client networking with peer {} {}", 
clientAddress, cause.getMessage());
+        }

Review Comment:
   I am not sure I am getting your comment right ... The way how NoSpamLogger 
seems to work is that it will not repeat same message all over again during 
some period. It does not mean it will not repeat any message if some was 
already logged.
   
   Example: lets say we have messages to log, "msg1" and "msg2". What 
NoSpamLogger does is that it will log "msg1" and then "msg2" but if you ever 
send any other "msg2" to it during 1 minute, it will not log that. But that 
does not mean that it will not log msg1 if 1 minute passed from its last log. 
   
   In other words, these periods of 1 minute are _per message_, not _per 
logger_. Logger via which we log these messages might be same.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to