Pierre Villard created NIFI-16153:
-------------------------------------

             Summary: Avoid FlowController read lock when reading clustered 
state
                 Key: NIFI-16153
                 URL: https://issues.apache.org/jira/browse/NIFI-16153
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: Pierre Villard


FlowController.isClustered() acquires the read lock to return a single boolean, 
and every other cluster-state accessor reaches that lock through it, so a 
component that reads cluster state while being enabled during flow 
synchronization blocks until the synchronizing thread releases the write lock. 
Making the clustered field volatile and returning it directly removes the 
contention, with no loss of atomicity since the lock only ever guarded a single 
boolean read.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to