ml: clear last recently used parser to match next parser(#5524)
@@ -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;
}
}
