ahuang98 commented on PR #22111: URL: https://github.com/apache/kafka/pull/22111#issuecomment-4745964994
> Thanks for the review @ahuang98. WRT to your comment: > > The case with which this case is dealing is one where a TCP handshake between the local and destination node cannot be established. This is evidenced by repeated logs like the one below from the cluster where this behavior was observed: > > ``` > [WARN] 2026-04-06 21:18:28,964 [kafka-0-raft-outbound-request-thread] org.apache.kafka.clients.NetworkClient initiateConnect - [RaftManager id=0] Error connecting to node ... > ``` > > This means the KRaft fetch request is never sent over the wire by the local node. Instead, the connection failure will result in the connection state being `DISCONNECTED`, and `InterBrokerSendThread#checkDisconnects` will complete the request. The specific completion handler being invoked, `KafkaNetworkChannel#sendOnComplete`, is what adds the `BROKER_NOT_AVAILABLE` error response to the local node's message queue. > > I think you're referring to a case where we fall through to `InterBrokerSendThread#failExpiredRequests`, but I believe our request has already been removed from `unsentRequests` because the connection state to the destination is disconnected. Is my understanding correct? Synced offline, it seems we're referring to different incidents which can result in the same broken behavior. My comments on a potential RequestManager & KafkaNetworkChannel timing issue stem from https://gist.github.com/justin-chen/a7deade5b0ab17b33d64ec07cd2542ab -- 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]
