[ 
https://issues.apache.org/jira/browse/NIFI-12118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768281#comment-17768281
 ] 

ASF subversion and git services commented on NIFI-12118:
--------------------------------------------------------

Commit c28d040bcabb9cc8f716d8e8701fad63b1a3166f in nifi's branch 
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=c28d040bca ]

NIFI-12118: refactored RemoveRecordPath member variable that was caching 
values, and improve performance with Pattern.matcher().find() instead of 
.match().

This closes #7783

Signed-off-by: Chris Sampson <[email protected]>


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

Reply via email to