Nikita-Shupletsov commented on code in PR #23442:
URL: https://github.com/apache/kafka/pull/23442#discussion_r4686386226
##########
clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java:
##########
@@ -308,6 +308,157 @@ public void testAppendLargeNonCompressed(String
allocationStrategy) throws Excep
testAppendLarge(allocationStrategy, Compression.NONE);
}
+ @Test
+ public void testOversizedRecordIsReadyWithoutWaitingForLinger() throws
Exception {
+ int batchSize = 16 * 1024;
+ int lingerMs = 1000;
+
+ RecordAccumulator accum =
createTestRecordAccumulator(BUFFER_MEMORY_ALLOCATION_STRATEGY_FULL,
Review Comment:
should we add incremental here as well?
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/ChunkedRecordAccumulator.java:
##########
@@ -259,7 +259,7 @@ public RecordAppendResult append(String topic,
// TODO: review when compression is supported.
final NewBatchBuffer pendingNewBatch = newBatch;
appendResult = appendNewBatch(tp, dq, timestamp, key,
value, headers, callbacks,
- () ->
chunkedRecordsBuilder(pendingNewBatch.stream, pendingNewBatch.firstAppendSize),
nowMs);
Review Comment:
looks like firstAppendSize is no longer used anywhere. looks like we no
longer need NewBatchBuffer either
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/ChunkedRecordAccumulator.java:
##########
Review Comment:
probably this comment is no longer valid/needed
--
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]