bbende commented on code in PR #10812:
URL: https://github.com/apache/nifi/pull/10812#discussion_r2732935934
##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java:
##########
@@ -269,7 +269,6 @@ public CompletableFuture<Void>
enableControllerService(final ControllerServiceNo
}
serviceNode.verifyCanEnable();
- serviceNode.reloadAdditionalResourcesIfNecessary();
Review Comment:
I think we can also remove a similar line for processors here:
https://github.com/apache/nifi/blob/4c98a8842f50d118af1aa36318af406164a2c56f/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java#L1751
##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java:
##########
@@ -441,6 +441,12 @@ public void onTaskComplete() {
};
LOG.info("Starting {}", procNode);
+
+ if (procNode.isReloadAdditionalResourcesNecessary()) {
Review Comment:
We shouldn't need to check `isReloadAdditionalResourcesNecessary()` because
inside `reloadAdditionalResourcesIfNecessary()` it is doing the same logic and
only reloading if necessary
##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java:
##########
@@ -441,6 +441,12 @@ public void onTaskComplete() {
};
LOG.info("Starting {}", procNode);
+
+ if (procNode.isReloadAdditionalResourcesNecessary()) {
+ try (final NarCloseable ignored =
NarCloseable.withComponentNarLoader(extensionManager,
procNode.getComponent().getClass(), procNode.getIdentifier())) {
Review Comment:
I don't think we want to use the `NarCloseable` here because inside
`reloadAdditionalResourcesIfNecessary()` it is going to be closing this
`ClassLoader` and creating a new one
##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java:
##########
@@ -881,6 +887,11 @@ private CompletableFuture<Void>
enableControllerService(final ControllerServiceN
LOG.info("Enabling {}", service);
+ if (service.isReloadAdditionalResourcesNecessary()) {
+ try (final NarCloseable ignored =
NarCloseable.withComponentNarLoader(extensionManager,
service.getComponent().getClass(), service.getIdentifier())) {
+ service.reloadAdditionalResourcesIfNecessary();
+ }
Review Comment:
Same two comments from the procNode section
--
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]