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.
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.