Skip to content

Commit

Permalink
task: on retry, only put chunk down if there are no users (fix #8691)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Apr 9, 2024
1 parent e4d8d8c commit addc38e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/flb_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,14 @@ struct flb_task_retry *flb_task_retry_create(struct flb_task *task,
* we need to determinate if the source input plugin have some memory
* restrictions and if the Storage type is 'filesystem' we need to put
* the file content down.
*
* Note that we can only put the chunk down if there are no more active users
* otherwise it can lead to a corruption (https://github.com/fluent/fluent-bit/issues/8691)
*/
flb_input_chunk_set_up_down(task->ic);

if (task->users <= 1) {
flb_input_chunk_set_up_down(task->ic);
}

/*
* Besides limits adjusted above, a retry that's going to only one place
Expand Down

0 comments on commit addc38e

Please sign in to comment.