You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2021/06/21 14:19:00 UTC

[jira] [Created] (NIFI-8719) ProcessSession may leave open references to files in content repo until committed/rolled back

Mark Payne created NIFI-8719:
--------------------------------

             Summary: ProcessSession may leave open references to files in content repo until committed/rolled back
                 Key: NIFI-8719
                 URL: https://issues.apache.org/jira/browse/NIFI-8719
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Mark Payne
            Assignee: Mark Payne


The {{ProcessSession}} class offers several API calls that make it possible to write to the contents of a FlowFile. One of those is:
{code:java}
OutputStream write(FlowFile source); {code}
When this is called, the session returns an OutputStream that the caller is responsible for closing. However, when the OutputStream is closed, the underlying stream to the content repository is neither closed nor made available for reuse. As a result, if this is used to write to many FlowFiles, those FlowFiles can each be written to a separate file on disk as well as be left open until the session is committed or rolled back.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)