bbende commented on code in PR #10779:
URL: https://github.com/apache/nifi/pull/10779#discussion_r2699440965


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/ServiceStateTransition.java:
##########
@@ -70,6 +70,11 @@ public boolean transitionToEnabling(final 
ControllerServiceState expectedState,
     public boolean enable(final ControllerServiceReference 
controllerServiceReference) {
         writeLock.lock();
         try {
+            if (state == ControllerServiceState.ENABLED) {
+                logger.debug("{} is already enabled", controllerServiceNode);
+                return true;
+            }
+

Review Comment:
   When an invalid controller service reschedules the task for enabling, it may 
become enabled while waiting to retry, and this detects that.



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