DL1231 commented on code in PR #19430:
URL: https://github.com/apache/kafka/pull/19430#discussion_r2043802656


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1011,6 +1011,8 @@ private Optional<Throwable> 
releaseAcquiredRecordsForPerOffsetBatch(String membe
                 return Optional.empty();
             }
             if (offsetState.getValue().state == RecordState.ACQUIRED) {
+                // These records were fetched but they were not actually 
delivered to the client.
+                offsetState.getValue().tryReleaseDeliveryCount();

Review Comment:
   I considered  to decrement the deliveryCount in `startStateTransition` and 
`startBatchStateTransition`. However, since `incrementDeliveryCount` is a 
boolean value that only controls whether to increment the count, introducing a 
decrementing functionality would require either adding an additional 
`decrementDeliveryCount` parameter or modifying `incrementDeliveryCount` to be 
an enum type.
   What do you think?



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