DL1231 commented on code in PR #20837:
URL: https://github.com/apache/kafka/pull/20837#discussion_r2508475835
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -834,7 +840,7 @@ public ShareAcquiredRecords acquire(
boolean fullMatch = checkForFullMatch(inFlightBatch,
firstBatch.baseOffset(), lastOffsetToAcquire);
int numRecordsRemaining = maxRecordsToAcquire - acquiredCount;
boolean recordLimitSubsetMatch = isRecordLimitMode &&
checkForRecordLimitSubsetMatch(inFlightBatch, maxRecordsToAcquire,
acquiredCount);
- if (!fullMatch || inFlightBatch.offsetState() != null ||
recordLimitSubsetMatch) {
+ if (!fullMatch || inFlightBatch.offsetState() != null ||
recordLimitSubsetMatch || inFlightBatch.batchDeliveryCount() >= 2) {
Review Comment:
I've made the updates, PTAL.
For batches or records with a `deliveryCount >= 3`, we consider that bad
records exist within the batch. Therefore, depending on the specific situation
(such as whether there are pending records to be sent), we will determine the
sending behavior for each record.
--
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]