diff --git a/src/multiline/flb_ml.c b/src/multiline/flb_ml.c index 5521f4f116c..3898a3ae45a 100644 --- a/src/multiline/flb_ml.c +++ b/src/multiline/flb_ml.c @@ -709,9 +709,11 @@ int flb_ml_append(struct flb_ml *ml, uint64_t stream_id, } } else if (lru_parser && lru_parser->last_stream_id > 0) { - flb_ml_flush_parser_instance(ml, - lru_parser, - lru_parser->last_stream_id); + /* + * Clear last recently used parser to match new parser. + * Do not flush last_stream_id since it should continue to parsing. + */ + lru_parser = NULL; } } @@ -819,9 +821,11 @@ int flb_ml_append_object(struct flb_ml *ml, uint64_t stream_id, } } else if (lru_parser && lru_parser->last_stream_id > 0) { - flb_ml_flush_parser_instance(ml, - lru_parser, - lru_parser->last_stream_id); + /* + * Clear last recently used parser to match new parser. + * Do not flush last_stream_id since it should continue to parsing. + */ + lru_parser = NULL; } }