Skip to content

Commit

Permalink
bug fix: request NULL, force_racks in MetadataReq
Browse files Browse the repository at this point in the history
  • Loading branch information
jainruchir committed Jun 14, 2023
1 parent 88707a0 commit 7c15746
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions examples/describe_consumer_groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,6 @@ int main(int argc, char **argv) {
* Create Kafka client configuration place-holder
*/
conf = rd_kafka_conf_new();
conf_set(conf, "sasl.username", "broker");
conf_set(conf, "sasl.password", "broker");
conf_set(conf, "sasl.mechanism", "SCRAM-SHA-256");
conf_set(conf, "security.protocol", "SASL_PLAINTEXT");

/*
* Parse common options
Expand Down
2 changes: 1 addition & 1 deletion src/rdkafka_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ rd_kafka_parse_Metadata(rd_kafka_broker_t *rkb,
/* If force_racks is true, the outptr mdip has to contain the partition
* to rack map. */
rd_bool_t force_rack_computation =
request->rkbuf_u.Metadata.force_racks;
request ? request->rkbuf_u.Metadata.force_racks : rd_false;
rd_bool_t compute_racks = has_client_rack || force_rack_computation;

/* Ignore metadata updates when terminating */
Expand Down

0 comments on commit 7c15746

Please sign in to comment.