logstash-plugins / logstash-codec-multiline

Apache License 2.0
7 stars 31 forks source link

eliminate re-use of codecs across identities #70

Closed yaauie closed 2 years ago

yaauie commented 2 years ago

Some Logstash codecs (like CSV) are stateful and cannot be reused across multiple input streams. This change removes a minor optimization, in which the base codec is repeatedly reused for the first concurrent accessor, despite the identities for the identity map not matching previous usages. Instead, when an identity is provided, we ensure that a clone of the base codec is provided for each distinct identity up and until eviction, and that the clone is not reused after its eviction flush.