filter_rewrite_tag: prevent to emit original record when in_emit pauses
If in_emitter pauses before original input plugin pauses,
some records will emit even if keep option is disabled.
Since keep property is only used when emitting is success.
@@ -417,7 +417,7 @@ static int cb_rewrite_tag_filter(const void *data, size_t bytes,
* - record with new tag was emitted and the rule says it must be preserved
* - record was not emitted
*/
- if ((ret == FLB_TRUE && keep == FLB_TRUE) || ret == FLB_FALSE) {
+ if (keep == FLB_TRUE) {
msgpack_sbuffer_write(&mp_sbuf, (char *) data + pre, off - pre);
}
