adixitconfluent commented on code in PR #17539:
URL: https://github.com/apache/kafka/pull/17539#discussion_r1816827231


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1525,6 +1537,24 @@ private Optional<Throwable> acknowledgeCompleteBatch(
         return Optional.empty();
     }
 
+    protected void updateLatestFetchOffsetMetadata(LogOffsetMetadata 
fetchOffsetMetadata) {
+        lock.writeLock().lock();
+        try {
+            latestFetchOffsetMetadata = fetchOffsetMetadata;

Review Comment:
   Hi @junrao, understood, so if there is any calls to acknowledge/acquisition 
lock timeout/release acquired records on session close, I should update the 
latestFetchOffsetMetadata to `Optional.empty()`. Then when the next tryComplete 
call comes, it will update the `latestFetchOffsetMetadata` and we will have the 
most recent result. Or is my understanding incorrect?



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