chickenchickenlove opened a new pull request, #23442: URL: https://github.com/apache/kafka/pull/23442
The producer currently uses the allocated buffer's remaining capacity as the `MemoryRecordsBuilder` write limit. For an oversized record, this capacity can exceed `batch.size`, leaving the batch unready until `linger.ms` expires even though its estimated size already exceeds the configured batch size. This PR passes `batch.size` as the write limit while retaining a buffer large enough to hold the record. Tests cover immediate readiness for oversized batches, linger behavior when the compressed size estimate is below `batch.size`, and preventing additional records from being appended to oversized batches. The existing partitioner test is also updated to reflect earlier selection of the next partition. -- 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]
