You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lianetm (via GitHub)" <gi...@apache.org> on 2024/04/05 15:39:19 UTC

Re: [PR] KAFKA-16103: commitSync should await pending async commits [kafka]

lianetm commented on code in PR #15613:
URL: https://github.com/apache/kafka/pull/15613#discussion_r1553899936


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1360,6 +1362,9 @@ public void commitSync(Map<TopicPartition, OffsetAndMetadata> offsets, Duration
             Timer requestTimer = time.timer(timeout.toMillis());
             SyncCommitEvent syncCommitEvent = new SyncCommitEvent(offsets, requestTimer);
             CompletableFuture<Void> commitFuture = commit(syncCommitEvent);
+
+            awaitPendingAsyncCommits(requestTimer, false);

Review Comment:
   nit: maybe helpful to reflect in the name that this does execute the callbacks (or leave it as it is and then have the one line that does execute the callbacks here, right after) 



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org