jolshan commented on code in PR #21065:
URL: https://github.com/apache/kafka/pull/21065#discussion_r2673520340


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java:
##########
@@ -1132,7 +1156,7 @@ void abortBatches(final RuntimeException reason) {
                 dq.remove(batch);
             }
             batch.abort(reason);
-            deallocate(batch);
+            completeBatchAndDeallocate(batch);

Review Comment:
   Can you clarify this part -- apologies, I may just not understand the bug 
fully
   
   > My understanding is that if TxnManager is in the fatal state, producer 
could still accumulate record batches in the accumulator. The Sender will just 
abort those batches in runOnce(). This could still expose the buffer reuse 
problem.
   
   The problem is that the newly accumulated batches (that will get aborted on 
runOnce()) can modify the infight batch? And then the problem is that we may 
send the inflight batch to the wrong place? 



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

Reply via email to