nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattyb...@apache.org
Subject [nifi] branch main updated: NIFI-8719: Ensure that when OutputStream is returned from StandardProcessSession.write, upon close of the OutputStream we close the underlying resources.
Date Mon, 21 Jun 2021 16:55:55 GMT
This is an automated email from the ASF dual-hosted git repository.

mattyb149 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new b1ad13c  NIFI-8719: Ensure that when OutputStream is returned from StandardProcessSession.write,
upon close of the OutputStream we close the underlying resources.
b1ad13c is described below

commit b1ad13c83588d9206ceb8a157acb9bdb7fdbd4f8
Author: Mark Payne <markap14@hotmail.com>
AuthorDate: Mon Jun 21 10:19:27 2021 -0400

    NIFI-8719: Ensure that when OutputStream is returned from StandardProcessSession.write,
upon close of the OutputStream we close the underlying resources.
    
    Signed-off-by: Matthew Burgess <mattyb149@apache.org>
    
    This closes #5170
---
 .../org/apache/nifi/controller/repository/StandardProcessSession.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
index e5dbc97..614abc4 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
@@ -2824,6 +2824,9 @@ public class StandardProcessSession implements ProcessSession, ProvenanceEventEn
                     }
 
                     closed = true;
+
+                    countingOut.close();
+                    rawStream.close();
                     writeRecursionSet.remove(sourceFlowFile);
 
                     final long bytesWritten = countingOut.getBytesWritten();

Mime
View raw message