From 8b6866e1dd5ac6006558d83ca44098cbc856293f Mon Sep 17 00:00:00 2001 From: Yinxiu Jia <48558845+kenneth-jia@users.noreply.github.com> Date: Tue, 14 May 2019 07:35:53 +0000 Subject: [PATCH] rd_kafka_broker_handle_ApiVersion() should not call rd_kafka_broker_fail() within bufq_timeout_scan --- src/rdkafka_broker.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/rdkafka_broker.c b/src/rdkafka_broker.c index 07b2ed3838..5d7b58b499 100644 --- a/src/rdkafka_broker.c +++ b/src/rdkafka_broker.c @@ -2093,11 +2093,17 @@ rd_kafka_broker_handle_ApiVersion (rd_kafka_t *rk, &apis, &api_cnt); if (err) { - rd_kafka_broker_fail(rkb, LOG_DEBUG, - RD_KAFKA_RESP_ERR__TRANSPORT, - "ApiVersionRequest failed: %s: " - "probably due to old broker version", + if (err == RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE) { + rd_kafka_dbg(rkb->rkb_rk, BROKER + RD_KAFKA_DBG_PROTOCOL, "BROKERFAIL", + "ApiVersionRequest failed: %s", rd_kafka_err2str(err)); + } else { + rd_kafka_broker_fail(rkb, LOG_DEBUG, + RD_KAFKA_RESP_ERR__TRANSPORT, + "ApiVersionRequest failed: %s: " + "probably due to old broker version", + rd_kafka_err2str(err)); + } return; }