junrao commented on code in PR #18737:
URL: https://github.com/apache/kafka/pull/18737#discussion_r1957164708


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractMembershipManager.java:
##########
@@ -837,6 +849,9 @@ void maybeReconcile() {
         revokedPartitions.addAll(ownedPartitions);
         revokedPartitions.removeAll(assignedTopicPartitions);
 
+        if (autoCommitEnabled && !revokedPartitions.isEmpty() && !canCommit) 
return;
+        markReconciliationInProgress();

Review Comment:
   `signalReconciliationStarted()` commits the offset of all assigned 
partitions. In the case when there is no revocation, we still allow the 
background thread to call `subscriptions.allConsumed()` without coordination 
from the application thread. So, we could still commit an offset that's not 
fully consumed by the application.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractMembershipManager.java:
##########
@@ -818,7 +831,6 @@ void maybeReconcile() {
             return;
         }
 
-        markReconciliationInProgress();

Review Comment:
   extra new line



-- 
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

Reply via email to