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

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

Commit cd2a346140481a7d4c0d8076c5bef70b20e7c7d9 in nifi's branch 
refs/heads/main from ing-mattioni
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=cd2a3461404 ]

NIFI-15935 Clean up AMQP resources after processor failures (#11243)

> AMQP processors should clean up resources after unexpected processor failures
> -----------------------------------------------------------------------------
>
>                 Key: NIFI-15935
>                 URL: https://issues.apache.org/jira/browse/NIFI-15935
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 2.9.0
>            Reporter: Claudio Mattioni
>            Assignee: Claudio Mattioni
>            Priority: Major
>              Labels: AMQP
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> AMQP processors based on AbstractAMQPProcessor should clean up resources 
> consistently after unexpected processor failures.
> Current behavior:
> - When processResource() throws an Exception, AbstractAMQPProcessor logs the 
> failure and yields the context.
> - The AMQP resource is not explicitly closed in this generic failure path.
> - The ProcessSession is not explicitly rolled back in this catch block.
> - If resource creation fails after the executor has been created, the AMQP 
> connection is closed, but the executor service is not explicitly shut down.
> This can leave AMQP client resources in an inconsistent state after 
> unexpected processor failures and can also leave executor resources running 
> when AMQP resource creation fails.
> Proposed changes:
> - Roll back the ProcessSession after unexpected processor failures.
> - Close the AMQP resource after unexpected processor failures.
> - Shut down the AMQP executor service when resource creation fails.
> - Update the executor thread naming pattern to use a generic AMQP client name.



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

Reply via email to