frankvicky commented on code in PR #18737:
URL: https://github.com/apache/kafka/pull/18737#discussion_r1936745835


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -250,7 +251,10 @@ private void process(final SyncCommitEvent event) {
 
         try {
             CommitRequestManager manager = 
requestManagers.commitRequestManager.get();
-            CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> future = 
manager.commitSync(event.offsets(), event.deadlineMs());
+            CompletableFuture<Map<TopicPartition, OffsetAndMetadata>> future = 
manager.commitSync(
+                event.offsets().orElseGet(subscriptions::allConsumed),
+                event.deadlineMs()
+            );

Review Comment:
   Hi @lianetm 
   I believe `commitSync` also needs to get the latest consumed offsets, so I 
added a `subscriptions::allConsumed` invocation 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