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

Mark Payne resolved NIFI-6420.
------------------------------
       Resolution: Fixed
    Fix Version/s: 1.10.0

> Controller Service references not properly tracked if multiple references 
> from same component
> ---------------------------------------------------------------------------------------------
>
>                 Key: NIFI-6420
>                 URL: https://issues.apache.org/jira/browse/NIFI-6420
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Priority: Major
>              Labels: cleanup, codesmell, refactor
>             Fix For: 1.10.0
>
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> The StandardControllerServiceNode keeps track of any references to it via 
> `addReference` and `removeReference` methods. However, if a Processor (or 
> another Controller Service) has two different properties that reference the 
> service, then the references can become incorrect.
> This is due to the fact that when Properties are set for a component, we 
> determine that Property A previously referenced Service 123 but no longer 
> does and call `removeReference` on Service 123. However, if Property B also 
> is referencing Service 123, we have a condition where the Processor is 
> referencing Service 123, but Service 123 does not know about it, because of 
> the call to `removeReference`.
> We should either be storing references as a `List` in 
> `StandardControllerServiceNode` or else should determine whether or not all 
> references have been removed before calling `removeReference`. I suspect that 
> the latter is less error-prone, given that calls to `addReference` currently 
> are idempotent and changing the data structure to a `List` would mean that 
> the method is no longer idempotent.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to