diff --git a/CHANGES.txt b/CHANGES.txt index 40016a133f..d63016bdbb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.18 + * Netty epoll IOExceptions caused by unclean client disconnects being logged at INFO (CASSANDRA-14909) * Unfiltered.isEmpty conflicts with Row extends AbstractCollection.isEmpty (CASSANDRA-14588) * RangeTombstoneList doesn't properly clean up mergeable or superseded rts in some cases (CASSANDRA-14894) * Fix handling of collection tombstones for dropped columns from legacy sstables (CASSANDRA-14912) diff --git a/src/java/org/apache/cassandra/transport/Message.java b/src/java/org/apache/cassandra/transport/Message.java index 28c8920625..91ece5c526 100644 --- a/src/java/org/apache/cassandra/transport/Message.java +++ b/src/java/org/apache/cassandra/transport/Message.java @@ -608,7 +608,21 @@ public abstract class Message if (!alwaysLogAtError && exception instanceof IOException) { - if (ioExceptionsAtDebugLevel.contains(exception.getMessage())) + String errorMessage = exception.getMessage(); + boolean logAtTrace = false; + + for (String ioException : ioExceptionsAtDebugLevel) + { + // exceptions thrown from the netty epoll transport add the name of the function that failed + // to the exception string (which is simply wrapping a JDK exception), so we can't do a simple/naive comparison + if (errorMessage.contains(ioException)) + { + logAtTrace = true; + break; + } + } + + if (logAtTrace) { // Likely unclean client disconnects logger.trace(message, exception);