philipnee commented on code in PR #14842: URL: https://github.com/apache/kafka/pull/14842#discussion_r1408235006
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java: ########## @@ -184,7 +184,7 @@ private static long findMinTime(final Collection<? extends RequestState> request * completed future if no request is generated. */ public CompletableFuture<Void> maybeAutoCommit(final Map<TopicPartition, OffsetAndMetadata> offsets) { - if (!autoCommitState.isPresent()) { + if (!canAutoCommit()) { Review Comment: In fact, let me change the name of ``` public boolean canSendAutocommit() { return !this.hasInflightCommit && this.timer.isExpired(); } ``` to `shouldAutoCommit, because when the timer has expired, we should send the autocommit. -- 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