From commits-return-44798-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Mon Jun 21 16:55:57 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id F2AF118037A for ; Mon, 21 Jun 2021 18:55:56 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 649D76039C for ; Mon, 21 Jun 2021 16:55:56 +0000 (UTC) Received: (qmail 9876 invoked by uid 500); 21 Jun 2021 16:55:55 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 9866 invoked by uid 99); 21 Jun 2021 16:55:55 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jun 2021 16:55:55 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 93A89821E0; Mon, 21 Jun 2021 16:55:55 +0000 (UTC) Date: Mon, 21 Jun 2021 16:55:55 +0000 To: "commits@nifi.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. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <162429455487.31344.14460004444834013720@gitbox.apache.org> From: mattyb149@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: nifi X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Oldrev: 2efc2b6b8b309aa198143e02084449a6069d7e62 X-Git-Newrev: b1ad13c83588d9206ceb8a157acb9bdb7fdbd4f8 X-Git-Rev: b1ad13c83588d9206ceb8a157acb9bdb7fdbd4f8 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 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();