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


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/ExtensionBuilder.java:
##########
@@ -507,6 +509,9 @@ private ProcessorNode createProcessorNode(final 
LoggableComponent<Processor> pro
        applyDefaultSettings(procNode);
        applyDefaultRunDuration(procNode);
 
+       // Ensure StateManager is initialized with component's Stateful 
capabilities
+       getStateManagerForComponent(identifier, 
processor.getComponent().getClass());

Review Comment:
   Calling this method raised some questions about the approach to creating the 
StateManager. This surfaces the fact that the Standard implementation of the 
StateManagerProvider caches instances, but the ExtensionBuilder should not need 
to be aware of this implementation detail. For this reason, these calls should 
be removed, and another approach should be considered for returning the 
appropriate instance of a StateManager.



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