Skip to content

Commit

Permalink
Fix response parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
anchitj committed Jan 29, 2024
1 parent 5f5a6f8 commit 4508cb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/rdkafka_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,11 @@ rd_kafka_handle_Produce_parse(rd_kafka_broker_t *rkb,
* request we assume that the reply only contains one topic+partition
* and that it is the same that we requested.
* If not the broker is buggy. */
rd_kafka_buf_skip_str(rkbuf);
rd_kafkap_str_t topic_name;
if (request->rkbuf_reqhdr.ApiVersion >= 9)
rd_kafka_buf_read_str(rkbuf, &topic_name);
else
rd_kafka_buf_skip_str(rkbuf);
rd_kafka_buf_read_arraycnt(rkbuf, &PartitionArrayCnt,
RD_KAFKAP_PARTITIONS_MAX);

Expand Down
7 changes: 1 addition & 6 deletions tests/0011-produce_batch.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,15 +623,10 @@ static void test_message_single_partition_record_fail(void) {
rkt = rd_kafka_topic_new(rk, topic_name, topic_conf);
if (!rkt)
TEST_FAIL("Failed to create topic: %s\n", rd_strerror(errno));
rd_sleep(5);

test_IncrementalAlterConfigs_simple(rk, RD_KAFKA_RESOURCE_TOPIC,
topic_name, confs_set_append, 1);


test_IncrementalAlterConfigs_simple(rk, RD_KAFKA_RESOURCE_TOPIC,
topic_name, confs_set_append, 1);

rd_sleep(5);

/* Create messages */
rkmessages = calloc(sizeof(*rkmessages), msgcnt);
Expand Down

0 comments on commit 4508cb4

Please sign in to comment.