hachikuji commented on a change in pull request #9619:
URL: https://github.com/apache/kafka/pull/9619#discussion_r527073144



##########
File path: 
clients/src/main/java/org/apache/kafka/common/protocol/SendBuilder.java
##########
@@ -122,6 +123,14 @@ public void writeVarlong(long i) {
         ByteUtils.writeVarlong(i, buffer);
     }
 
+    private void flushPendingSend() {
+        if (!buffers.isEmpty()) {
+            ByteBuffer[] byteBufferArray = buffers.toArray(new ByteBuffer[0]);
+            sends.add(new ByteBufferSend(destinationId, byteBufferArray));

Review comment:
       I was somewhat inclined to leave this as is, but finally I decided to do 
it since it might help (even if only little) with fetch overhead.




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