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



##########
File path: 
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java
##########
@@ -37,6 +37,7 @@
     private final Time time;
     private final SimpleTimer lingerTimer;
     private final int lingerMs;
+    private final int minFlushSize;

Review comment:
       Yeah, I think there should be a configuration here; I am just a little 
unsure how it should affect the batch size. In the producer, for example, we 
just expose the batch size directly. We could do the same here, but I'm 
slightly inclined to keep the batch size decoupled from this configuration. Say 
for example, that we have a hard-coded 1MB max batch size. Then we could say 
that the effective batch size is equal to `min(1MB, maxUnflushedSize)`. A user 
_could_ then define `maxUnflushedSize` to be larger than 1MB and we would not 
have to deal with the implications of huge batches. Does that make sense?
   
   @jsancio Any thoughts on 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