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



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
##########
@@ -1115,6 +1115,10 @@ private void ensureValidRecordSize(int size) {
      */
     @Override
     public void flush() {
+        boolean invokedFromCallback = Thread.currentThread() == this.ioThread;

Review comment:
       As this check is used by ```close``` also, could you add a helper method 
to return boolean?




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