[ 
https://issues.apache.org/jira/browse/NIFI-12118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Sampson updated NIFI-12118:
---------------------------------
    Fix Version/s: 2.0.0
                   1.24.0
                       (was: 1.latest)
                       (was: 2.latest)
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> 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: 2.0.0, 1.24.0
>
>          Time Spent: 20m
>  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)

Reply via email to