Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
emasab committed Apr 15, 2024
1 parent e5fb72d commit 4657f99
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rdkafka_cgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,10 @@ static int rd_kafka_cgrp_metadata_refresh(rd_kafka_cgrp_t *rkcg,

rd_list_init(&topics, 8, rd_free);

/* Insert all non-wildcard topics in cache. */
rd_kafka_metadata_cache_hint_rktparlist(
rkcg->rkcg_rk, rkcg->rkcg_subscription, NULL, 0 /*dont replace*/);

if (rkcg->rkcg_flags & RD_KAFKA_CGRP_F_WILDCARD_SUBSCRIPTION) {
/* For wildcard subscriptions make sure the
* cached full metadata isn't too old. */
Expand Down Expand Up @@ -5007,8 +5011,9 @@ rd_kafka_cgrp_subscription_set(rd_kafka_cgrp_t *rkcg,
rkcg->rkcg_subscription = rktparlist;
if (rkcg->rkcg_subscription) {
/* Insert all non-wildcard topics in cache immediately.
* to avoid problems with subsequent metadata
* requests. */
* Otherwise a manual full metadata request could
* not cache the hinted topic and return an
* UNKNOWN_TOPIC_OR_PART error to the user. See #4589. */
rd_kafka_metadata_cache_hint_rktparlist(
rkcg->rkcg_rk, rkcg->rkcg_subscription, NULL,
0 /*dont replace*/);
Expand Down

0 comments on commit 4657f99

Please # to comment.