lianetm commented on code in PR #24191:
URL: https://github.com/apache/kafka/pull/24191#discussion_r4606534230


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/ChunkedRecordAccumulator.java:
##########
@@ -124,13 +124,12 @@ public RecordAppendResult append(String topic,
         List<ByteBuffer> extensionChunks = null;
 
         // This append's share of max.block.ms, as an absolute deadline. 
Blocking allocations bound themselves against it.
-        // Retries that never block are bounded by it through 
throwIfNoMoreRetriesAllowed: they are allowed while
-        // time is left. All retries bounded consistently (retry failed 
extension, retry on partition change).
+        // A retry after a denied non-blocking extension is bounded by it 
through throwIfNoMoreRetriesAllowed.
+        // Retries that waited for nothing (partition switch, batch changed by 
a concurrent appender) are not:

Review Comment:
   agree with not bounding the retries due to partition change (like full 
does). But as for the case where the retry is because the batch changed 
(extension not available anymore) I'm not sure we're ok not bounding it? 
   
   That extension + batch change case can only happen on the incremental, so no 
direct point of comparison with full, and the trigger/cadence seems different 
to the partition change? The retry on batch change can happen whenever an 
append needs extension and a concurrent appender touches the batch (vs. a more 
"rare" partition change, only when we get a full batch.size for partition)
   
   That batch change case was the initial concern when we introduced the limit 
for the retries 
([this](https://github.com/apache/kafka/pull/23008#discussion_r3708216183)). 
   
   Could we treat them differently maybe? (keep it unbound for the partition 
change case, consistent with trunk, but bound it for the batch change case 
specific to incremental/extension?) 



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