[ https://issues.apache.org/jira/browse/NIFI-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362994#comment-15362994 ]
Oleg Zhurakousky commented on NIFI-2160: ---------------------------------------- Thank you [~devriesb], so Mark and I both believe that the issue (as you pointed out) may be with comparison logic. Basically on Java 8 it seem to be fine and well the way it is now. However the fact that comparison logic is based on only returning 1 or -1 means that the sorting is not completely reliable and/or fully deterministic since it's lacking 0. So I am making the following change in the comparator https://github.com/apache/nifi/blob/0.x/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L320, but if you can pre-empt it and do it locally and build and lat us know that would help greatly. Basically change is very simple: Change {code} return s2.getRequiredControllerServices().contains(s1) ? -1 : 1; {code} to {code} return s2.getRequiredControllerServices().contains(s1) ? -1 : (s1.getRequiredControllerServices().contains(s2) ? 1 : 0); {code} Meanwhile I'll try to reproduce it with Java 7, but please let me know if you can do the above and it fixes the issue. Thanks for all the input > Enabled ControllerServices disabled on restart > ---------------------------------------------- > > Key: NIFI-2160 > URL: https://issues.apache.org/jira/browse/NIFI-2160 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 0.7.0 > Reporter: Brandon DeVries > Assignee: Oleg Zhurakousky > Priority: Critical > Fix For: 1.0.0, 0.7.0 > > > As a result of the fix for NIFI-2032, *previously enabled ControllerServices > become disabled after a restart* if they are not referenced by another > component. However, we use a custom domain specific langauge that can > reference a controller service from a query defined as a custom processor's > property. This means that we use a number of controller service that are > only used in this way (i.e. are never directly referred to by another > component). Upon restart, these are now disabled causing issues with our > flows. > I have not yet stepped through the new enableControllerServices() \[1\] > method to figure out exactly where the issue is coming from, but I wanted to > get the ticket out there and on the radar, as this breaks backwards > compatibility on a feature we heavily rely on. > \[1\] > https://github.com/apache/nifi/blob/0.x/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L301-336 -- This message was sent by Atlassian JIRA (v6.3.4#6332)