mirror of https://github.com/apache/kafka.git
KAFKA-1884; Add logging upon metadata response errors; reviewed by Guozhang Wang
This commit is contained in:
parent
944628b0f5
commit
31dadf0242
|
@ -391,6 +391,10 @@ public class NetworkClient implements KafkaClient {
|
||||||
this.metadataFetchInProgress = false;
|
this.metadataFetchInProgress = false;
|
||||||
MetadataResponse response = new MetadataResponse(body);
|
MetadataResponse response = new MetadataResponse(body);
|
||||||
Cluster cluster = response.cluster();
|
Cluster cluster = response.cluster();
|
||||||
|
// check if any topics metadata failed to get updated
|
||||||
|
if (response.errors().size() > 0) {
|
||||||
|
log.warn("Error while fetching metadata with correlation id {} : {}", header.correlationId(), response.errors());
|
||||||
|
}
|
||||||
// don't update the cluster if there are no valid nodes...the topic we want may still be in the process of being
|
// don't update the cluster if there are no valid nodes...the topic we want may still be in the process of being
|
||||||
// created which means we will get errors and no nodes until it exists
|
// created which means we will get errors and no nodes until it exists
|
||||||
if (cluster.nodes().size() > 0) {
|
if (cluster.nodes().size() > 0) {
|
||||||
|
|
Loading…
Reference in New Issue