[ 
https://issues.apache.org/jira/browse/NIFI-16153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Handermann updated NIFI-16153:
------------------------------------
    Fix Version/s: 2.11.0
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> 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
>            Assignee: Pierre Villard
>            Priority: Major
>             Fix For: 2.11.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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