DL1231 commented on code in PR #20837:
URL: https://github.com/apache/kafka/pull/20837#discussion_r2533136977
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -362,6 +367,7 @@ enum SharePartitionState {
this.leaderEpoch = leaderEpoch;
this.maxInFlightRecords = maxInFlightRecords;
this.maxDeliveryCount = maxDeliveryCount;
+ this.badRecordDeliveryThreshold = (int) Math.ceil((double)
maxDeliveryCount / 2);
Review Comment:
> I think you can use a record that returns no. of acquired records
Thanks for your suggestion. It makes sense, and I will make the necessary
revisions.
> I think it should be Math.max(2, (int) Math.ceil((double) maxDeliveryCount
/ 2))
Actually, this value represents the point at which the retrieved records are
limited to a subset. When the count limit is set to 2 and the threshold is also
set to 2, it means that the batch transmission will only be restricted after
two deliveries have already been made. However, by that point, the count limit
has already been reached, and the batch will be archived.
--
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]