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

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

Commit 5223a0605027a9c18d04849ec454b44d4614eec8 in nifi's branch 
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=5223a06050 ]

NIFI-14690: Reverted to the previous logic of creating a new LifecycleState 
object in stateless engine when calling ProcessorNode stop. We changed to using 
the shared instance to ensure that thread counts are correct when a Processor 
is terminated. But for stopping we need a separate instance to ensure that we 
properly shutdown all instances. In testing, I also noticed that we were 
calling StatelessFlowTask.shutdown() synchronously for each instance when we 
should be able to shut them all down in parallel, as well as performing some 
cleanup of logging messages.

Signed-off-by: Pierre Villard <[email protected]>

This closes #10045.


> When running a Stateless flow, ensure that we can call Processors' @OnStopped 
> methods after terminating flow
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-14690
>                 URL: https://issues.apache.org/jira/browse/NIFI-14690
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When we stop a stateless flow, we have a situation in which we stop all 
> instances. However, they currently share the same LifecycleState object, 
> which means that after the first instance terminates processors, all 
> subsequent instances fail to call the Processors' @OnStopped methods, 
> throwing a TerminatedTaskException when attempting to increment the active 
> thread count. This is not obvious in the UI but shows in the logs, and it 
> results in not properly handling the closing of resources.



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

Reply via email to