vincent81jiang commented on a change in pull request #11864: URL: https://github.com/apache/kafka/pull/11864#discussion_r821986892
########## File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java ########## @@ -1003,6 +1003,9 @@ void invokeCompletedOffsetCommitCallbacks() { RequestFuture<Void> future = null; if (!coordinatorUnknown()) { future = doCommitOffsetsAsync(offsets, callback); + } else if (offsets.isEmpty()) { + // No need to lookup coordinator if offsets is empty since commit of empty offsets is completed locally. + future = doCommitOffsetsAsync(offsets, callback); Review comment: Make sense. Updated. -- 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