This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 3fbc0c0df2 NIFI-14434 Avoid calling OnRemoved when Processor is 
Reloaded (#9914)
3fbc0c0df2 is described below

commit 3fbc0c0df2bac96b92a7a7f02d0205b3285604bb
Author: Mark Payne <[email protected]>
AuthorDate: Mon May 5 14:43:33 2025 -0400

    NIFI-14434 Avoid calling OnRemoved when Processor is Reloaded (#9914)
    
    - Processor reloading includes certain property modifications and processor 
termination
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../java/org/apache/nifi/controller/StandardReloadComponent.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardReloadComponent.java
 
b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardReloadComponent.java
index c3ae6023f9..3282b8cf0e 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardReloadComponent.java
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardReloadComponent.java
@@ -80,12 +80,8 @@ public class StandardReloadComponent implements 
ReloadComponent {
         final StandardProcessContext processContext = new 
StandardProcessContext(existingNode, 
flowController.getControllerServiceProvider(),
             stateManager, () -> false, flowController);
 
-        // call OnRemoved for the existing processor using the previous 
instance class loader
-        try (final NarCloseable ignored = 
NarCloseable.withComponentNarLoader(existingInstanceClassLoader)) {
-            
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnRemoved.class, 
existingNode.getProcessor(), processContext);
-        } finally {
-            extensionManager.closeURLClassLoader(id, 
existingInstanceClassLoader);
-        }
+        // Cleanup the URL ClassLoader for the existing processor instance.
+        extensionManager.closeURLClassLoader(id, existingInstanceClassLoader);
 
         // Ensure that we notify the Python Bridge that we're removing the old 
processor, if the Processor is Python based.
         // This way we can shutdown the Process if necessary before creating a 
new processor (which may then spawn a new process).

Reply via email to