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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java:
##########
@@ -186,6 +187,7 @@ public ConsumerCoordinator(GroupRebalanceConfig 
rebalanceConfig,
         this.completedOffsetCommits = new ConcurrentLinkedQueue<>();
         this.sensors = new ConsumerCoordinatorMetrics(metrics, 
metricGrpPrefix);
         this.interceptors = interceptors;
+        this.inFlightAsyncCommits = new AtomicInteger();
         this.pendingAsyncCommits = new AtomicInteger();

Review Comment:
   Thanks @dajac - Do you mean the code isn't changing the counter in the 
commit callback? I don't know the exact reason, but my guess is, the commit 
isn't sent until a coordinator is ready and it is therefore called "pending".  
If the coordinator is connected, then there's no point to increment and 
decrement the counter, because there will be a response anyway.
   
   I'm in supportive of the consolidating suggestions.  For me, it is mentally 
difficult to manage multiple different states correctly.



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