You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2022/05/26 14:33:49 UTC
[nifi] branch main updated: NIFI-10051: Clear Controller Services' state in a background thread instead of the web thread.
This is an automated email from the ASF dual-hosted git repository.
mattyb149 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 35d8bb5ca9 NIFI-10051: Clear Controller Services' state in a background thread instead of the web thread.
35d8bb5ca9 is described below
commit 35d8bb5ca95c077268f5b442222e3086cfd97377
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue May 24 17:19:24 2022 -0400
NIFI-10051: Clear Controller Services' state in a background thread instead of the web thread.
Signed-off-by: Matthew Burgess <ma...@apache.org>
This closes #6078
---
.../src/main/java/org/apache/nifi/groups/StandardProcessGroup.java | 2 +-
.../main/java/org/apache/nifi/controller/flow/StandardFlowManager.java | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index 76d6180545..19d4fb2046 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -2378,7 +2378,7 @@ public final class StandardProcessGroup implements ProcessGroup {
}
});
- stateManagerProvider.onComponentRemoved(service.getIdentifier());
+ scheduler.submitFrameworkTask(() -> stateManagerProvider.onComponentRemoved(service.getIdentifier()));
removed = true;
LOG.info("{} removed from {}", service, this);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/flow/StandardFlowManager.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/flow/StandardFlowManager.java
index 7973d5fc33..4a88d40f26 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/flow/StandardFlowManager.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/flow/StandardFlowManager.java
@@ -453,7 +453,8 @@ public class StandardFlowManager extends AbstractFlowManager implements FlowMana
}
rootControllerServices.remove(service.getIdentifier());
- flowController.getStateManagerProvider().onComponentRemoved(service.getIdentifier());
+
+ processScheduler.submitFrameworkTask(() -> flowController.getStateManagerProvider().onComponentRemoved(service.getIdentifier()));
extensionManager.removeInstanceClassLoader(service.getIdentifier());