Skip to content

Commit

Permalink
* NEW [parquet] Fix the null ptr in parquet->payload_arr.
Browse files Browse the repository at this point in the history
Signed-off-by: wangha <[email protected]>
  • Loading branch information
wanghaEMQ committed Jan 24, 2025
1 parent d102415 commit e4591df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mqtt/protocol/exchange/exchange_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ static void query_send_async(exchange_sock_t *s, struct cmd_data *cmd_data)
nng_msg *newmsg = NULL;
nng_msg_alloc(&newmsg, 0);
nni_msg_append(newmsg, parquet_decoded_data->data, parquet_decoded_data->len);
nng_sendmsg(*(s->pair0_sock), newmsg, 0);
if (s->pair0_sock)
nng_sendmsg(*(s->pair0_sock), newmsg, 0);
else
log_error("pair0_sock is null!!!!!!!!!");
/* NOTE: sleep 1000ms */
nng_msleep(1000);
stream_decoded_data_free(parquet_decoded_data);
Expand Down Expand Up @@ -630,6 +633,7 @@ exchange_sock_init(void *arg, nni_sock *sock)
nni_mtx_init(&s->mtx);
nni_id_map_init(&s->rbmsgmap, 0, 0, true);
s->isBusy = false;
s->pair0_sock = NULL;

nni_lmq_init(&s->lmq, 256);

Expand Down
2 changes: 2 additions & 0 deletions src/supplemental/nanolib/parquet/parquet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,8 @@ static parquet_data_ret *parquet_read_payload(shared_ptr<parquet::RowGroupReader
parquet_data_packet **payload_arr = read_column_data(col.reader, index_vector, batch_size, total_values_read);
if (payload_arr) {
ret_rows_vec.push_back(payload_arr);
} else {
ret_rows_vec.push_back(nullptr);
}
}

Expand Down

0 comments on commit e4591df

Please sign in to comment.