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

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

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

NIFI-9293: Ensure that we properly set the scheduled flag in the LifecycleState 
when stopping processors. Added system test to verify that @OnScheduled, 
onTrigger, @OnUnscheduled, @OnStopped are all called and in the expected order

This closes #5706.

Signed-off-by: Peter Turcsanyi <turcsa...@apache.org>


> Stateless engine does not stop processors properly
> --------------------------------------------------
>
>                 Key: NIFI-9293
>                 URL: https://issues.apache.org/jira/browse/NIFI-9293
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: NiFi Stateless
>            Reporter: Peter Turcsanyi
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.16.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When the embedding application calls {{StatelessDataflow.shutdown()}} to stop 
> the stateless flow and all its processors, then the expected behaviour would 
> be (similar to traditional NiFi):
> - call {{@OnUnscheduled}} method(s) of the processor
> - wait for {{onTrigger()}} to finish up
> - call {{@OnStopped}} method(s) of the processor
> Currently {{@OnUnscheduled}} is not called at all and {{@OnStopped}} gets 
> called while {{onTrigger()}} is still running.
> These may lead to improper shutdown of the components: e.g. ConsumeJMS stays 
> connected to the message broker after is has been stopped (up until the JVM 
> exits).
> It is more problematic for long-running embedding applications that can 
> start/stop flows dynamically within their JVM uptime (like Kafka Connect and 
> NiFi Stateless connectors).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to