lucasbru opened a new pull request, #15613: URL: https://github.com/apache/kafka/pull/15613
The javadoc for `KafkaConsumer.commitSync` says: > Note that asynchronous offset commits sent previously with the {@link #commitAsync(OffsetCommitCallback)} > (or similar) are guaranteed to have their callbacks invoked prior to completion of this method. This is not always true, neither for the legacy consumer nor for the async consumer. This change proposed a number of fixes related to this guarantee: - In the legacy consumer, we're also awaiting async commits that are "pending" instead of "in-flight", because we do not know the coordinator yet. - In the new consumer, we keep track of the incomplete async commit futures and wait for them to complete before returning from `commitSync`. - Since we need to block to make sure that our previous commits are completed, we allow the consumer to wake up. This is implemented but we are leaving it unresolved in the legacy consumer. ## Testing A new integration test ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org