Skip to content

Commit

Permalink
fixed potential bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Jan 15, 2025
1 parent e64b13b commit 9c970c1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/MofkaConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,16 @@ void MofkaConsumer::recvBatch(const tl::request& req,
batch->m_meta_sizes[i]}};
serializer.deserialize(metadata_archive, metadata);
// deserialize the data descriptors
BufferWrapperInputArchive descriptors_archive{
std::string_view{
batch->m_data_desc_buffer.data() + data_desc_offset,
batch->m_data_desc_sizes[i]}};
DataDescriptor descriptor;
descriptor.load(descriptors_archive);
if(batch->m_data_desc_sizes[i] > 0) {
BufferWrapperInputArchive descriptors_archive{
std::string_view{
batch->m_data_desc_buffer.data() + data_desc_offset,
batch->m_data_desc_sizes[i]}};
descriptor.load(descriptors_archive);
} else {
descriptor = DataDescriptor::Null();
}
// request Data associated with the event
auto data = requestData(
partition, metadata,
Expand Down

0 comments on commit 9c970c1

Please sign in to comment.