chirag-wadhwa5 commented on code in PR #20810:
URL: https://github.com/apache/kafka/pull/20810#discussion_r2486420735


##########
share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorShard.java:
##########
@@ -995,6 +998,7 @@ private static ShareGroupOffset merge(ShareGroupOffset 
soFar, ShareUpdateValue n
             .setSnapshotEpoch(soFar.snapshotEpoch())
             .setStateEpoch(soFar.stateEpoch())
             .setStartOffset(newStartOffset)
+            .setDeliveryCompleteCount(newData.deliveryCompleteCount())

Review Comment:
   Thanks for the review. This method is called during the replay of records, 
specifically when a record of type ShareUpdate is replayed. Now 
`deliveryCompleteCount` is updated in every subsequent ShareUpdate record; 
thus, the latest value should be the one present in the last ShareUpdate 
record. So, when the current soft state is being merged with the newly read 
ShareUpdate record, regardless of the value, we need to use the ShareUpdate 
record for `deliveryCompleteCount`. We can maybe get a confirmation from 
@AndrewJSchofield here



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