ijuma commented on a change in pull request #9885:
URL: https://github.com/apache/kafka/pull/9885#discussion_r557038771



##########
File path: core/src/main/scala/kafka/server/KafkaApis.scala
##########
@@ -1068,13 +1068,14 @@ class KafkaApis(val requestChannel: RequestChannel,
             response
           } catch {
             // NOTE: These exceptions are special cases since these error 
messages are typically transient or the client
-            // would have received a clear exception and there is no value in 
logging the entire stack trace for the same
+            // would have received a clear exception.
             case e @ (_ : UnknownTopicOrPartitionException |
-                      _ : NotLeaderForPartitionException |
+                      _ : NotLeaderOrFollowerException |
                       _ : UnknownLeaderEpochException |
                       _ : FencedLeaderEpochException |
                       _ : KafkaStorageException |
                       _ : UnsupportedForMessageFormatException) =>
+              // print the stack trace for debugging
               e.printStackTrace()

Review comment:
       This doesn't make much sense, we should not be printing the stacktrace 
like this.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to