FrankYang0529 commented on code in PR #17150:
URL: https://github.com/apache/kafka/pull/17150#discussion_r1823879430


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -187,22 +188,62 @@ private void process(final CreateFetchRequestsEvent 
event) {
 
     private void process(final AsyncCommitEvent event) {

Review Comment:
   Hi @kirktrue, do you mean that update `CommitRequestManager` like following?
   
   ```java
       public CompletableFuture<Void> commitSync(final 
Optional<Map<TopicPartition, OffsetAndMetadata>> offsets,
                                                 final long deadlineMs) {
           if (!offsets.isPresent() || offsets.get().isEmpty()) {
               return CompletableFuture.completedFuture(null);
           }
           CompletableFuture<Void> result = new CompletableFuture<>();
           OffsetCommitRequestState requestState = 
createOffsetCommitRequest(offsets.get(), deadlineMs);
           commitSyncWithRetries(requestState, result);
           return result;
       }
   ```
   
   If we do that, we have to run `maybeUpdateLastSeenEpochIfNewer(offsets)` 
after future is complete.  Is there any side effect for this change?



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