[ https://issues.apache.org/jira/browse/NIFI-12693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Handermann updated NIFI-12693: ------------------------------------ Resolution: Fixed Status: Resolved (was: Patch Available) > When Processor is removed, Python Process should be notified asynchronously > --------------------------------------------------------------------------- > > Key: NIFI-12693 > URL: https://issues.apache.org/jira/browse/NIFI-12693 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Reporter: Mark Payne > Assignee: Mark Payne > Priority: Major > Fix For: 2.0.0 > > Time Spent: 20m > Remaining Estimate: 0h > > When a Processor is removed, the PythonBridge is notified of the removal, and > it then notifies any relevant Python process. This is done synchronously > during the removal. I encountered two occurrences in which notifying the > Python process failed. > While the failure itself is not a huge concern, the handling of those > failures resulted in very bad outcomes. In the first instance, the > communication with the Python process was blocked on a socket read or write. > As a result, the Service Facade's lock was never released, and no web > requests could be made; they all blocked on the read lock. This resulted in > requiring a restart of NiFi. > In the other scenario, the call did not block indefinitely but threw an > Exception. In this case, the associated Connections were never removed. As a > result, I could no longer navigate to that Process Group in the UI, or the UI > would have errors because there were Connections whose source or destination > didn't exist. This required manually removing those connections from the > flow.json file to recover. > Since the intention of this action is simply a notification so that the > Python process can cleanup after itself, this notification should be moved to > a background thread, so that any failures are simply logged without causing > problematic side effects. -- This message was sent by Atlassian Jira (v8.20.10#820010)