Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input_chunk: check return values when calculating found chunks for new space. #9921

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/flb_input_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ int flb_input_chunk_find_space_new_data(struct flb_input_chunk *ic,
"new data coming from input plugin %s", flb_input_name(ic->in));
}

return 0;
return count;
}

/*
Expand Down Expand Up @@ -575,13 +575,18 @@ int flb_input_chunk_has_overlimit_routes(struct flb_input_chunk *ic,
*/
int flb_input_chunk_place_new_chunk(struct flb_input_chunk *ic, size_t chunk_size)
{
int result;
int overlimit;
struct flb_input_instance *i_ins = ic->in;

if (i_ins->storage_type == CIO_STORE_FS) {
overlimit = flb_input_chunk_has_overlimit_routes(ic, chunk_size);
if (overlimit != 0) {
flb_input_chunk_find_space_new_data(ic, chunk_size, overlimit);
result = flb_input_chunk_find_space_new_data(ic, chunk_size, overlimit);

if (result != 0) {
return 0;
}
}
}
return !flb_routes_mask_is_empty(ic->routes_mask);
Expand Down
Loading