Skip to content

Commit

Permalink
engine: Handle zero size as no limit
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Dec 20, 2023
1 parent 8e242f4 commit 4412e75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ static inline int handle_input_event(flb_pipefd_t fd, uint64_t ts,

static inline double calculate_chunk_capacity_percent(struct flb_output_instance *ins)
{
if (ins->total_limit_size == -1) {
/* Currently, total_limit_size 0(K|M)B will be translated as no
* limit. So, we need to handle this situation to be unlimited. */
if (ins->total_limit_size <= 0) {
return 100.0;
}

Expand Down

0 comments on commit 4412e75

Please sign in to comment.