[
https://issues.apache.org/jira/browse/NIFI-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15072832#comment-15072832
]
ASF GitHub Bot commented on NIFI-1164:
--------------------------------------
Github user markap14 commented on the pull request:
https://github.com/apache/nifi/pull/141#issuecomment-167591336
@olegz - I'm very happy that you are digging in here. This bit of code
certainly could use some TLC and refactoring. I very much like the approach of
moving this logic into the StandardControllerServiceNode object instead of the
scheduler. I did notice one issue that appears to be a race condition if
enable() and disable() are running in parallel (commented inline). Otherwise,
I've not seen any other issues but will continue to review this. Thanks again
for tackling this!
> Race condition during initialization of ControllerServices - (part due)
> -----------------------------------------------------------------------
>
> Key: NIFI-1164
> URL: https://issues.apache.org/jira/browse/NIFI-1164
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.3.0
> Reporter: Oleg Zhurakousky
> Assignee: Oleg Zhurakousky
> Fix For: 0.5.0
>
>
> Similar to NIFI-1143, but the exception is happening in the different place
> {code}testConcurrencyWithEnablingReferencingServicesGraph(org.apache.nifi.controller.service.TestStandardControllerServiceProvider)
> Time elapsed: 0.162 sec <<< ERROR!
> java.lang.IllegalStateException: ServiceB[id=4] cannot be enabled because it
> is not disabled
> at
> org.apache.nifi.controller.service.StandardControllerServiceNode.verifyCanEnable(StandardControllerServiceNode.java:183)
> at
> org.apache.nifi.controller.service.StandardControllerServiceProvider.enableReferencingServices(StandardControllerServiceProvider.java:549)
> at
> org.apache.nifi.controller.service.StandardControllerServiceProvider.enableReferencingServices(StandardControllerServiceProvider.java:544)
> at
> org.apache.nifi.controller.service.TestStandardControllerServiceProvider.testEnableReferencingServicesGraph(TestStandardControllerServiceProvider.java:154)
> at
> org.apache.nifi.controller.service.TestStandardControllerServiceProvider.testConcurrencyWithEnablingReferencingServicesGraph(TestStandardControllerServiceProvider.java:124)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)