[ 
https://issues.apache.org/jira/browse/NIFI-16153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100156#comment-18100156
 ] 

ASF subversion and git services commented on NIFI-16153:
--------------------------------------------------------

Commit 89828cf75cbfb3fb0ea2e40f1e2afd7472f2e306 in nifi's branch 
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=89828cf75cb ]

NIFI-16153 Avoid FlowController read lock when reading clustered status (#11484)

Signed-off-by: David Handermann <[email protected]>

> 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
>          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