kirktrue commented on code in PR #13678: URL: https://github.com/apache/kafka/pull/13678#discussion_r1190210077
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java: ########## @@ -1132,6 +1136,7 @@ public void onSuccess(Void value) { if (interceptors != null) interceptors.onCommit(offsets); completedOffsetCommits.add(new OffsetCommitCompletion(cb, offsets, null)); + inFlightAsyncCommits.decrementAndGet(); Review Comment: Can we wrap the `decrementAndGet` calls in a `try`/`finally` block in case something weird happens in the code that comes before it? ########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java: ########## @@ -1145,6 +1150,7 @@ public void onFailure(RuntimeException e) { if (commitException instanceof FencedInstanceIdException) { asyncCommitFenced.set(true); } + inFlightAsyncCommits.decrementAndGet(); Review Comment: I'm not sure if we need to wrap the `decrementAndGet` call in a `try`/`finally` block here, too? -- 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