chia7712 commented on a change in pull request #10024:
URL: https://github.com/apache/kafka/pull/10024#discussion_r574460737



##########
File path: core/src/main/scala/kafka/common/InterBrokerSendThread.scala
##########
@@ -78,6 +77,9 @@ abstract class InterBrokerSendThread(
       failExpiredRequests(now)
       unsentRequests.clean()
     } catch {
+      case _: DisconnectException if isShutdownInitiated =>
+        // DisconnectException is caused by NetworkClient#ensureActive
+        // this thread is closing so this error is acceptable

Review comment:
       @dajac Thanks for your response.
   
   >  I would rather use client.active() instead of isShutdownInitiated. This 
is something that we should have done in #9999.
   
   It seems to me the exception is available only if the thread is going to 
shutdown. If network client get closed and it is not caused by calling 
Thread#shutdown, we still throw fatal exception as it is totally unexpected 
behavior.




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