markap14 commented on PR #11241:
URL: https://github.com/apache/nifi/pull/11241#issuecomment-4444327964

   Hey @bobpaulin thanks for looking into this. Looking at the code, I think we 
can probably simplify things quite a bit. In particular, we're picking and 
choosing which Controller Services we "pre-enable" and then handling those 
separately from the rest. I presume this is due to this comment in the code:
   ```
                   // Inherit Parameter Providers and Connectors first. Because 
Connectors are a bit different, in that updates could result in Exceptions 
being thrown,
                   // due to the fact that they manipulate the flow, and 
changes can be aborted, we handle them first. This way, if there's any 
Exception,
                   // we can fail before updating parts of the flow that are 
not managed by Connectors.
                   // Because Connectors may depend on Parameter Providers, we 
need to ensure that we inherit Parameter Providers first.
   ```
   
   But I don't think this is really necessary. Instead, what if we just inherit 
the Controller Services before we inherit the Parameter Providers & Connectors? 
That comment was really more of a "let's do connectors first, just in case 
there are issues." So we'd avoid inheriting a Controller Service locally if 
there was a failure inheriting Connectors. At the time, it seemed like this was 
largely "free." But now, this approach introduces significant complexity and 
confusion because Controller Services are selectively handled here or there.
   
   IMO, I think we should look at just inheriting the root-level Controller 
Services before Parameter Providers.


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