kirktrue commented on code in PR #13678:
URL: https://github.com/apache/kafka/pull/13678#discussion_r1190226530


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java:
##########
@@ -1223,6 +1233,26 @@ public void maybeAutoCommitOffsetsAsync(long now) {
         }
     }
 
+    private boolean waitForPendingAsyncCommits(Timer timer) {

Review Comment:
   The code appears to check `inFlightAsyncCommits` only in the case where the 
incoming `offsets` map is empty. Wouldn't we want to always check that?
   
   @philipnee's suggestion makes sense to me:
   
   ```java
   if (offsets.isEmpty() && inflightCommit.get() == 0)
       return true;
   ```
   
   `sendOffsetCommitRequest` already handles the case where the incoming map is 
empty, so perhaps that could be left as is?



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