You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jason Gustafson (JIRA)" <ji...@apache.org> on 2019/04/29 14:54:00 UTC

[jira] [Resolved] (KAFKA-7779) Avoid unnecessary loop iteration in leastLoadedNode

     [ https://issues.apache.org/jira/browse/KAFKA-7779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Gustafson resolved KAFKA-7779.
------------------------------------
    Resolution: Fixed

> Avoid unnecessary loop iteration in leastLoadedNode
> ---------------------------------------------------
>
>                 Key: KAFKA-7779
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7779
>             Project: Kafka
>          Issue Type: Improvement
>          Components: network
>    Affects Versions: 2.1.0
>            Reporter: huxihx
>            Assignee: huxihx
>            Priority: Minor
>
> In NetworkClient.leastLoadedNode, it invokes `isReady` to  check if an established connection exists for the given node. `isReady` checks whether metadata needs to be updated also which wants to make metadata request first priority. However, if the to-be-sent request is metadata request, then we do not have to check this otherwise the loop in `leastLoadedNode` will do a complete iteration until the final node is selected. That's not performance efficient for a large cluster.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)