[
https://issues.apache.org/jira/browse/NIFI-11681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Handermann resolved NIFI-11681.
-------------------------------------
Fix Version/s: 2.0.0
1.23.0
(was: 1.latest)
(was: 2.latest)
Resolution: Fixed
> 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: 2.0.0, 1.23.0
>
> 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)