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

Joe Witt commented on NIFI-6344:
--------------------------------

Given the new capabilities for migrating configs in NiFi 2.0 we can fix this.

Add a property to UpdateAttribute that is 'Failure Strategy' and the options 
are 'rollback' or 'route to failure'.  If that property is set with rollback it 
behaves like it does now and I recommend that remain the default.  If that 
property is set to 'route to failure' then we add a relationship which needs to 
be set which is of course called 'failure'.  For flows being migrated from a 
version before this behavior was available to a version that has this 
capability we just set the value of this parameter to our default.

This lets existing flows migrate over just fine.  It lets us give users a 
failure path for the cases they want one.  It lets us keep the vast majority of 
flows and uses of this where failure is not relevant stay clean.  And it 
handles migration.

The processor needs to be updated to catch the exceptions and then follow this 
logic.  Today it just lets it fly to the framework which causes the processor 
to yield and penalizes the flowfile for the default time.  When now catching 
the problem we should just avoid yielding and instead penalize the specific 
offending flowfile which lets everything else operate super fast.

Thanks to Mark Payne for the chat on this.

> Add Failure Relationship to UpdateAttribute
> -------------------------------------------
>
>                 Key: NIFI-6344
>                 URL: https://issues.apache.org/jira/browse/NIFI-6344
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.9.2
>            Reporter: Peter Wicks
>            Assignee: Peter Wicks
>            Priority: Minor
>              Labels: attribute, backwards-compatibility, expression-language, 
> routing
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> EL makes it possible for an UpdateAttribute processor to fail. When this 
> happens the FlowFile is rolled back, and there is no way to route it to 
> handle the failure automatically.
> Considerations:
> UpdateAttribute is used in probably all but the simplest of flows, thus any 
> change made to support a failure relationship must be handled delicately. The 
> goal of this change is for users to have no change in functionality unless 
> they specifically configure it.
> Proposal: 
> It was proposed on the Slack channel to create the failure relationship, but 
> default it to auto-terminate. This is a good start, but without further work 
> would result in a change in functionality. I propose that we will default to 
> auto-terminate, but also detect this behavior in the code. If the Failure 
> relationship is set to auto-terminate then we will rollback the transaction.
> The only downside I see with this is you can't actually auto-terminate 
> Failures without the addition of another property, such as Failure Behavior: 
> Route to Failure and Rollback options.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to