Mark Payne created NIFI-6832:
--------------------------------

             Summary: Site-to-Site should not create a Content Claim for 0-byte 
FlowFiles
                 Key: NIFI-6832
                 URL: https://issues.apache.org/jira/browse/NIFI-6832
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Mark Payne
            Assignee: Mark Payne


When FlowFiles are received via Site-to-Site, it creates a FlowFile and then 
writes the content from the InputStream to the FlowFile. However, if the 
FlowFile is 0 bytes, it should avoid every calling `ProcessSession.write`. 
Doing so has the overhead of seeking to the appropriate place on disk to begin 
writing, but more importantly it ties the FlowFile to the underlying 
ResourceClaim. As a result, we have a 0 byte FlowFile that can prevent a 
(potentially large) Content Claim from being cleaned up, until the 0 byte 
FlowFile has been dropped.



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

Reply via email to