Skip to content

Commit dc28665

Browse files
committed
fixup: Fix for the case where a metadata refresh enqueued on an unreachable broker prevents refreshing the controller or the coordinator until that broker becomes reachable again
Fixes the fallthrough case that wasn't executed if metadata retry failed
1 parent a821043 commit dc28665

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/rdkafka_request.c

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,24 +2627,22 @@ static void rd_kafka_handle_Metadata(rd_kafka_t *rk,
26272627
rd_kafka_buf_retry(rkb, request))
26282628
return;
26292629
/* FALLTHRU */
2630-
} else {
2631-
rd_rkb_log(rkb, LOG_WARNING, "METADATA",
2632-
"Metadata request failed: %s: %s (%dms): %s",
2633-
request->rkbuf_u.Metadata.reason,
2634-
rd_kafka_err2str(err),
2635-
(int)(request->rkbuf_ts_sent / 1000),
2636-
rd_kafka_actions2str(actions));
2637-
/* Respond back to caller on non-retriable errors */
2638-
if (rko && rko->rko_replyq.q) {
2639-
rko->rko_err = err;
2640-
rko->rko_u.metadata.md = NULL;
2641-
rko->rko_u.metadata.mdi = NULL;
2642-
rd_kafka_replyq_enq(&rko->rko_replyq, rko, 0);
2643-
rko = NULL;
2644-
}
26452630
}
26462631

2647-
2632+
rd_rkb_log(rkb, LOG_WARNING, "METADATA",
2633+
"Metadata request failed: %s: %s (%dms): %s",
2634+
request->rkbuf_u.Metadata.reason,
2635+
rd_kafka_err2str(err),
2636+
(int)(request->rkbuf_ts_sent / 1000),
2637+
rd_kafka_actions2str(actions));
2638+
/* Respond back to caller on non-retriable errors */
2639+
if (rko && rko->rko_replyq.q) {
2640+
rko->rko_err = err;
2641+
rko->rko_u.metadata.md = NULL;
2642+
rko->rko_u.metadata.mdi = NULL;
2643+
rd_kafka_replyq_enq(&rko->rko_replyq, rko, 0);
2644+
rko = NULL;
2645+
}
26482646

26492647
/* FALLTHRU */
26502648

0 commit comments

Comments
 (0)