sfc-gh-mpayne commented on PR #9829: URL: https://github.com/apache/nifi/pull/9829#issuecomment-2770444657
I think this is probably okay. This exists as a safeguard against buggy Processors. In particular, if you create a Processor that extends AbstractSessionFactoryProcessor, you have full control over the ProcessSession. This ensures that if that processor calls `ProcessSession.read`, `ProcessSession.write` etc. that we eventually can clean up those resources. And if it pulls FlowFiles off of a queue and never commits or rolls back the session they can eventually be re-queued without a restart of NiFi, instead of letting the FlowFiles kind of exist in the ether. So it helped to kind of ensure that we do all we can to protect ourselves against buggy Processors. But at the end of the day, there's really only so much we can do. Processors can still open sockets, file handles, etc. and fail to close them and leak resources that way. And they could still potentially hold on to references to the Process Sessions, preventing the finalizer from being called also. While I think it is nice to have it there, given the deprecation of finalizers, it's probably reasonable to just remove the method. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
