Dariusz Seweryn created NIFI-14283:
--------------------------------------
Summary: 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
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)