diff --git a/src/flb_input_chunk.c b/src/flb_input_chunk.c index df8876b3dd4..8aa81df8c7b 100644 --- a/src/flb_input_chunk.c +++ b/src/flb_input_chunk.c @@ -475,8 +475,6 @@ int flb_input_chunk_has_overlimit_routes(struct flb_input_chunk *ic, int overlimit = 0; struct mk_list *head; struct flb_output_instance *o_ins; - struct flb_input_instance *i_ins = ic->in; - mk_list_foreach(head, &ic->in->config->outputs) { o_ins = mk_list_entry(head, struct flb_output_instance, _head); @@ -486,12 +484,6 @@ int flb_input_chunk_has_overlimit_routes(struct flb_input_chunk *ic, continue; } - if (i_ins->storage_type == CIO_STORE_MEM) { - flb_plg_debug(i_ins, "plugin is in memory storage mode, storage.total_limit_size " - "from output %s has no effect", o_ins->name); - continue; - } - FS_CHUNK_SIZE_DEBUG(o_ins); flb_debug("[input chunk] chunk %s required %ld bytes and %ld bytes left " "in plugin %s", flb_input_chunk_get_name(ic), chunk_size, @@ -516,12 +508,14 @@ 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 overlimit; + struct flb_input_instance *i_ins = ic->in; - overlimit = flb_input_chunk_has_overlimit_routes(ic, chunk_size); - if (overlimit != 0) { - flb_input_chunk_find_space_new_data(ic, chunk_size, overlimit); + 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); + } } - return !flb_routes_mask_is_empty(ic->routes_mask); }