exceptionfactory commented on code in PR #10238: URL: https://github.com/apache/nifi/pull/10238#discussion_r2337201860
########## nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/state/StandardStateManager.java: ########## @@ -24,21 +24,34 @@ import org.apache.nifi.logging.ComponentLog; import org.apache.nifi.logging.LogRepository; import org.apache.nifi.logging.LogRepositoryFactory; -import org.apache.nifi.processor.SimpleProcessLogger; import org.apache.nifi.logging.StandardLoggingContext; +import org.apache.nifi.processor.SimpleProcessLogger; import java.io.IOException; import java.util.Map; +import java.util.function.Supplier; public class StandardStateManager implements StateManager { private final StateProvider localProvider; private final StateProvider clusterProvider; private final String componentId; + private final Supplier<Boolean> dropStateKeySupportedSupplier; public StandardStateManager(final StateProvider localProvider, final StateProvider clusterProvider, final String componentId) { + this(localProvider, clusterProvider, componentId, () -> false); + } + + public StandardStateManager(final StateProvider localProvider, final StateProvider clusterProvider, Review Comment: Is this constructor needed in addition to the `Supplier` based constructor? ########## nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/RepositoryContextFactory.java: ########## @@ -54,7 +54,13 @@ public RepositoryContextFactory(final ContentRepository contentRepository, final } public RepositoryContext newProcessContext(final Connectable connectable, final AtomicLong connectionIndex) { - final StateManager stateManager = stateManagerProvider.getStateManager(connectable.getIdentifier()); + final StateManager stateManager; + if (connectable instanceof org.apache.nifi.controller.ProcessorNode processorNode) { Review Comment: Is there a reason this is limited to Processors? Other components can also use state, and the annotation evaluation should not need to know about the type of class. -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org