Yunyung commented on code in PR #20040:
URL: https://github.com/apache/kafka/pull/20040#discussion_r2173285324


##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java:
##########
@@ -859,7 +866,7 @@ private void maybeAllocateNewBatch(
                 LogConfig logConfig = partitionWriter.config(tp);
                 int maxBatchSize = logConfig.maxMessageSize();
                 long prevLastWrittenOffset = coordinator.lastWrittenOffset();
-                ByteBuffer buffer = bufferSupplier.get(maxBatchSize);
+                ByteBuffer buffer = bufferSupplier.get(min(MIN_BUFFER_SIZE, 
maxBatchSize));

Review Comment:
   If so, we allow users to assign maxBatchSize smaller than `MIN_BUFFER_SIZE`. 
`MIN_BUFFER_SIZE` variable name does not match its semantics. Maybe rename it 
to "INITIAL_BUFFER_SIZE" or something similar.



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to