[
https://issues.apache.org/jira/browse/KAFKA-8275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856097#comment-17856097
]
Goufu commented on KAFKA-8275:
------------------------------
The leastLoadedNode() function has a bug during the consumer process starting
period. The function sendMetadataRequest() called by getTopicMetadataRequest()
uses a random node which maybe faulty since every node‘s state recorded in the
client thread is not ready yet. It happened in my production environment during
my consumer thread restarting and meanwhile one of the KAFKA server node is
dead.
I'm using the kafka-client-2.0.1.jar. I have checked the source code of higher
versions and the issue still exists.
> NetworkClient leastLoadedNode selection should consider throttled nodes
> -----------------------------------------------------------------------
>
> Key: KAFKA-8275
> URL: https://issues.apache.org/jira/browse/KAFKA-8275
> Project: Kafka
> Issue Type: Bug
> Components: clients, network
> Reporter: Jason Gustafson
> Assignee: Jason Gustafson
> Priority: Major
> Fix For: 2.3.0
>
>
> The leastLoadedNode() function is intended to find any available node. It is
> smart in the sense that it considers the number of inflight requests and
> reconnect backoff, but it has not been updated to take into account client
> throttling. If we have an available node which is not throttled, we should
> use it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)