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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractMembershipManager.java:
##########
@@ -818,6 +826,8 @@ void maybeReconcile() {
             return;
         }
 
+        if (autoCommitEnabled && !canCommit) return;

Review Comment:
   I think we can improve this a bit more: if there are no partitions to 
revoke, we could carry on with this reconciliation really, meaning no delay 
reconciling newly added partitions (reconciled from the background poll as 
before, no need to wait for the app poll).  
   
   So, I expect we just need to move this check (along with the 
markReconciliationInProg) to right before the log.info("Reconciling assignment 
with local epoch...")? and then we could check:
   
   ```
   if (autoCommitEnabled && !revokedPartitions.isEmpty() && !canCommit) return;
   ```
   
   would that work? 
   
   -- update
   This wouldn't work if we want to keep the current behaviour of the classic 
consumer which is to commit before every rebalance (not only before 
revocations). 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to