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

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

Commit e29c8af70892715a71940a09fc7911ecbe60adab in nifi's branch 
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=e29c8af ]

NIFI-9182: When calling ProcessSession.append(), do not allow calls from 
processor to flush the underlying BufferedOutputStream. Instead, wrap in a 
NonFlushableOutputStream and only flush when session commit is called

This closes #5359

Signed-off-by: David Handermann <[email protected]>


> ProcessSession flushes every time append() is called
> ----------------------------------------------------
>
>                 Key: NIFI-9182
>                 URL: https://issues.apache.org/jira/browse/NIFI-9182
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When StandardProcessSession.append(FlowFile, OutputStreamCallback) gets 
> called, we create a DisableOnCloseOutputStream and then provide that to the 
> OutputStream. But we use try-with-resources. So when the callback completes, 
> the OutputStream is closed, which calls flush(). This means that if we have 
> processor that calls append() many times, perhaps once per line of text, we 
> end up flushing for every line of text.



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

Reply via email to