[
https://issues.apache.org/jira/browse/NIFI-12118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Payne updated NIFI-12118:
------------------------------
Fix Version/s: 1.latest
2.latest
Status: Patch Available (was: Open)
> RemoveRecordField does not work if specifying FlowFile attributes
> -----------------------------------------------------------------
>
> Key: NIFI-12118
> URL: https://issues.apache.org/jira/browse/NIFI-12118
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.latest, 2.latest
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The Processor compiles all Record Paths on the first call to onTrigger, in
> the {{process}} method. To do this, it evaluates all dynamic properties
> against expression language. It then caches these compiled RecordPaths, and
> it never evaluates FlowFile attributes again. So if I configure the processor
> to remove /fields/${fieldName} and I then pass in a FlowFile where attribute
> {{fieldName}} is {{hello}} it will remove {{{}/fields/hello{}}}. But if the
> next FlowFile has the attribute value {{greeting}} it will still remove
> {{/fields/hello}} instead of removing {{/fields/greeting}}
> Additionally, the processor is not thread-safe. It uses a {{volatile List}}
> to store these RecordPaths. But if more than one Concurrent Task is set, any
> of the threads could win the race and set the value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)