lianetm commented on code in PR #17440: URL: https://github.com/apache/kafka/pull/17440#discussion_r1861159924
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java: ########## @@ -168,6 +171,8 @@ private void processApplicationEvents() { if (event instanceof CompletableEvent) applicationEventReaper.add((CompletableEvent<?>) event); + List<CompletableEvent<?>> completableEvents = reapExpiredApplicationEvents(currentTimeMs); Review Comment: agree we shouldn't involve the reaper before processing events (it could expire events that haven't had the chance to run once, ie. timeout 0). Alternatively, we have the completable `event` in hand, so what about something like `maybeFailOnMetadataError(List.of(event))` right after adding it to the reaper on ln 170? (we only care about CompletableEvents anyways), would that work @m1a2st ? -- 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