lianetm commented on code in PR #19886:
URL: https://github.com/apache/kafka/pull/19886#discussion_r2535560414
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/NetworkClientDelegate.java:
##########
@@ -229,6 +242,11 @@ protected void checkDisconnects(final long currentTimeMs) {
asyncConsumerMetrics.recordUnsentRequestsQueueTime(time.milliseconds() -
u.enqueueTimeMs());
AuthenticationException authenticationException =
client.authenticationException(u.node.get());
u.handler.onFailure(currentTimeMs, authenticationException);
+ } else if (u.node.isEmpty() && onClose) {
+ log.debug("Removing unsent request {} because the client is
closing", u);
+ iter.remove();
+
asyncConsumerMetrics.recordUnsentRequestsQueueTime(time.milliseconds() -
u.enqueueTimeMs());
+ u.handler.onFailure(currentTimeMs,
Errors.NETWORK_EXCEPTION.exception());
Review Comment:
My concern was regarding the **leader** to send the close fetch sessions to
(unrelated to the **coordinator**), but the answer to my concern is indeed in
the last bit of the comment above:
https://github.com/apache/kafka/blob/33c5e84c9fd29ad1702093b033b9b9dd873df174/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java#L406-L407
(don't attempt any re-discovery of the leader to send the close session)
So all good, thanks for addressing it!
--
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]