kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: MINOR: ConsumerNetworkClient does not need to send the remaining requests when the node is not ready (#6264)
Date Fri, 01 Mar 2019 16:55:10 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new caecc16  MINOR: ConsumerNetworkClient does not need to send the remaining requests
when the node is not ready (#6264)
caecc16 is described below

commit caecc16b5cc9c85acda50d68384a1ff9ebf930c9
Author: lambdaliu <lambda.tencent@gmail.com>
AuthorDate: Sat Mar 2 00:54:57 2019 +0800

    MINOR: ConsumerNetworkClient does not need to send the remaining requests when the node
is not ready (#6264)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java
b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java
index 924b3ef..9aa8eaa 100644
--- a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java
+++ b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java
@@ -474,6 +474,9 @@ public class ConsumerNetworkClient implements Closeable {
                 if (client.ready(node, now)) {
                     client.send(request, now);
                     iterator.remove();
+                } else {
+                    // try next node when current node is not ready
+                    break;
                 }
             }
         }


Mime
View raw message