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

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

Commit b85063cb81210a733a214b7e2427d949ce51005f in nifi's branch 
refs/heads/support/nifi-1.x from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=b85063cb81 ]

NIFI-11681: Terminate Process Sessions before interrupting processor threads

This closes #7371

Signed-off-by: David Handermann <[email protected]>
(cherry picked from commit 787e0d82614e345b5afbef6691c418c43cf0ab08)


> When Processor is Terminated, the thread is interrupted before the 
> ProcessSession is terminated
> -----------------------------------------------------------------------------------------------
>
>                 Key: NIFI-11681
>                 URL: https://issues.apache.org/jira/browse/NIFI-11681
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Minor
>             Fix For: 1.latest, 2.latest
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When a Processor is Terminated, we notify the session that it is terminated. 
> This rolls back the session and causes any subsequent calls into the session 
> or its InputStream / OutputStream to throw a TerminatedTaskException.
> Additionally, it interrupts any active threads in the Processor.
> However, it does these in the opposite order. It interrupts the Processor 
> thread first.
> As a result, it can interrupt the Processor thread, which allows the 
> Processor to continue on and call into the Process Session, before the 
> Process Session is terminated.
> This can cause the interrupted thread to transfer FlowFiles, etc. after being 
> interrupted.
> This is the cause of the frequent failures that we've seen in the  
> DynamicClassPathModificationIT system test: 
> {{DynamicClassPathModificationIT.testSuccessAfterTerminate » Timeout 
> testSuccessAfterTerminate() timed out after 5 minutes}}
> We need to mark the session as terminated before interrupting the thread, so 
> that any calls into the session will fail after interrupting the processor's 
> threads.



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

Reply via email to