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 89828cf75cb NIFI-16153 Avoid FlowController read lock when reading
clustered status (#11484)
89828cf75cb is described below
commit 89828cf75cbfb3fb0ea2e40f1e2afd7472f2e306
Author: Pierre Villard <[email protected]>
AuthorDate: Wed Jul 29 18:39:00 2026 +0200
NIFI-16153 Avoid FlowController read lock when reading clustered status
(#11484)
Signed-off-by: David Handermann <[email protected]>
---
.../main/java/org/apache/nifi/controller/FlowController.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
index a02f92b0b4c..bc899dfd194 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
@@ -406,11 +406,10 @@ public class FlowController implements
ReportingTaskProvider, FlowAnalysisRulePr
*/
private volatile NodeIdentifier nodeId;
- // guarded by rwLock
/**
* true if controller is connected or trying to connect to the cluster
*/
- private boolean clustered;
+ private volatile boolean clustered;
// guarded by rwLock
private volatile NodeConnectionStatus connectionStatus;
@@ -3006,12 +3005,7 @@ public class FlowController implements
ReportingTaskProvider, FlowAnalysisRulePr
*/
@Override
public boolean isClustered() {
- readLock.lock();
- try {
- return clustered;
- } finally {
- readLock.unlock("isClustered");
- }
+ return clustered;
}
@Override