knoxy5467 commented on PR #20358: URL: https://github.com/apache/kafka/pull/20358#issuecomment-3237070362
Then the sender which the record accumulator belongs to utilizes it's error handling to resolve the issue. https://github.com/apache/kafka/blob/26fea78ae1001933d910e5f61727e77edc03cded/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java#L678 On Fri, Aug 29, 2025, 6:31 AM Chia-Ping Tsai ***@***.***> wrote: > ***@***.**** commented on this pull request. > ------------------------------ > > In > clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java > <https://github.com/apache/kafka/pull/20358#discussion_r2310172351>: > > > @@ -514,7 +514,12 @@ public int splitAndReenqueue(ProducerBatch bigBatch) { > // the split doesn't happen too often. > CompressionRatioEstimator.setEstimation(bigBatch.topicPartition.topic(), compression.type(), > Math.max(1.0f, (float) bigBatch.compressionRatio())); > - Deque<ProducerBatch> dq = bigBatch.split(this.batchSize); > + int targetSplitBatchSize = this.batchSize; > + > + if (bigBatch.isSplitBatch()) { > + targetSplitBatchSize = Math.max(bigBatch.maxRecordSize, bigBatch.estimatedSizeInBytes() / 2); > > Out of curiosity, what happens if the single-record batch is still larger > than message.max.bytes? > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/kafka/pull/20358#pullrequestreview-3168749150>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABM6WLOPM3RW22IVM5W26HT3QBIZVAVCNFSM6AAAAACEAROD2GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTCNRYG42DSMJVGA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- 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