RivenSun2 commented on a change in pull request #11340: URL: https://github.com/apache/kafka/pull/11340#discussion_r742559955
########## File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java ########## @@ -1073,6 +1086,33 @@ private void doAutoCommitOffsetsAsync() { }); } + private boolean maybeAutoCommitOffsetsAsync() { + if (autoCommitEnabled) { + invokeCompletedOffsetCommitCallbacks(); + + if (onJoinPrepareAsyncCommitFuture == null) Review comment: Because we use asynchronous commitOffsets, and at the same time, in order not to block the Consumer#poll method We cannot call ConsumerNetworkClient#poll(future) The onJoinPrepareAsyncCommitFuture variable is introduced to deal with the "onJoinPrepareAsyncCommitFuture.isDone() == false" situation. Maybe my consideration is complicated, this situation can be retryed by Consumer#poll next time. -- 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