ivanyu commented on code in PR #13277:
URL: https://github.com/apache/kafka/pull/13277#discussion_r1623777938


##########
clients/src/main/java/org/apache/kafka/clients/NetworkClient.java:
##########
@@ -1123,6 +1133,17 @@ public long maybeUpdate(long now) {
             // Beware that the behavior of this method and the computation of 
timeouts for poll() are
             // highly dependent on the behavior of leastLoadedNode.
             Node node = leastLoadedNode(now);
+
+            // Rebootstrap if needed and configured.
+            if (node == null && metadataRecoveryStrategy == 
MetadataRecoveryStrategy.REBOOTSTRAP) {

Review Comment:
   I have an idea how to avoid rebootstrapping in this case. The idea is to 
pass some information along with the `Node` out of `leastLoadedNode`. See this 
commit 
https://github.com/apache/kafka/pull/13277/commits/3a303b7de650a6d6a94d5652a476ca9a98610380.
 Does it make sense? It changes the interface a little, but the overall change 
turned out to be smaller than I expected.



-- 
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

Reply via email to