lianetm commented on PR #20254:
URL: https://github.com/apache/kafka/pull/20254#issuecomment-3136300976

   Hey all, interesting. I don't have too much context but it does look fishy 
when we `tryAppendForSplit` and always allow a first record (no matter the size 
it seems), here 
https://github.com/apache/kafka/blob/4c1b79851f6858f42ca0eab33afa88af1c531c1f/clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java#L856
   
   Definitely needs more investigation, maybe start by adding a test to check 
the retry behaviour around `splitAndReenqueue` for a large batch with a single 
record? I cannot find any test for it (here it's all about batches that can 
indeed be split
   
   
https://github.com/apache/kafka/blob/4c1b79851f6858f42ca0eab33afa88af1c531c1f/clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java#L1016
 )
   
   Hope it helps, I will stay in the loop. 


-- 
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

Reply via email to