exceptionfactory commented on code in PR #10630:
URL: https://github.com/apache/nifi/pull/10630#discussion_r2619745475


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java:
##########
@@ -753,6 +753,18 @@ public CompletableFuture<Void> disable(final 
ScheduledExecutorService scheduler)
         final CompletableFuture<Void> future = new CompletableFuture<>();
         final boolean transitioned = 
this.stateTransition.transitionToDisabling(ControllerServiceState.ENABLING, 
future);
         if (transitioned) {
+            // If we transitioned from ENABLING to DISABLING, we need to 
immediately complete the disable
+            // because the enable task may be scheduled to run far in the 
future (up to 10 minutes) due to
+            // validation retries. Rather than making the user wait, we 
immediately transition to DISABLED.
+            scheduler.execute(() -> {
+                stateTransition.disable();

Review Comment:
   Thanks for walking through the behavior, on consideration, I agree, calling 
`OnDisabled` methods here should not be needed.



-- 
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