markap14 commented on code in PR #11515:
URL: https://github.com/apache/nifi/pull/11515#discussion_r3776346172


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java:
##########
@@ -264,6 +296,28 @@ private boolean isRunningOrStarting(final 
ReportingTaskNode node) {
         return scheduledState == ScheduledState.RUNNING || scheduledState == 
ScheduledState.STARTING;
     }
 
+    /**
+     * Returns the explicit stateless process group that the given process 
group belongs to, or {@code null} if the
+     * process group is not part of a stateless group. A group whose execution 
engine is {@code INHERITED} resolves to
+     * its nearest ancestor that explicitly declares an execution engine.
+     */
+    private ProcessGroup getStatelessGroup(final ProcessGroup start) {

Review Comment:
   I think there's a minor bug here. This returns the inner-most Process Group 
that is marked as STATELESS. But we need to operate on the outermost group. So 
if you have something like `STANDARD -> STANDARD -> INHERITED -> STATELESS -> 
INHERITED -> INHERITED` this works fine. But if it's `STANDARD -> STANDARD -> 
INHERITED -> STATELESS -> STATELESS -> STATELESS` we will have an issue because 
we'll attempt to operate on the inner-most group, which will fail because it is 
an inner Stateless group.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to