josefk31 commented on code in PR #21028:
URL: https://github.com/apache/kafka/pull/21028#discussion_r2941374822
##########
raft/src/test/java/org/apache/kafka/raft/MockLog.java:
##########
@@ -428,7 +428,8 @@ public LogFetchInfo read(long startOffset, Isolation
isolation) {
startOffset, metadataForOffset(startOffset)));
}
- ByteBuffer buffer = ByteBuffer.allocate(512);
+ int bufferSizeBytes = 512;
+ ByteBuffer buffer = ByteBuffer.allocate(bufferSizeBytes);
Review Comment:
Hmmm. The original implementation is a bit strange.
1. It assumes that two batch entries can be written to the 512byte buffer
2. It will only ever return a maximum of two entries (see L#461).
So my implementation idea was "oh, lets keep the behaviour the same but just
add the maxTotalBatchSize on top of that".
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]