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

Mark Payne updated NIFI-6420:
-----------------------------
    Labels: cleanup codesmell refactor  (was: )

> 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
>
> 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.3#76005)

Reply via email to