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

David Handermann resolved NIFI-14283.
-------------------------------------
    Fix Version/s: 2.3.0
         Assignee: Dariusz Seweryn
       Resolution: Fixed

> ConsumeKinesisStream non-static lock
> ------------------------------------
>
>                 Key: NIFI-14283
>                 URL: https://issues.apache.org/jira/browse/NIFI-14283
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 2.2.0
>            Reporter: Dariusz Seweryn
>            Assignee: Dariusz Seweryn
>            Priority: Trivial
>             Fix For: 2.3.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> ConsumeKinesisStream processor contains:
> ```
> private static final Object WORKER_LOCK = new Object();
> ```
>  
> This object is used for synchronizing blocks of code in:
>  * `onTrigger` where it guards generation of SchedulerId, creating a 
> Scheduler and starting a Thread that runs the Scheduler
>  * `@OnStopped stopConsuming` where the scheduler is shut down and instance's 
> `workerState` removed
>  
> There is no apparent static state touched in the synchronized block of code 
> therefore the lock can be turned into an instance field.



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

Reply via email to