Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E7F40200C4B for ; Mon, 20 Mar 2017 21:05:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E68B3160B76; Mon, 20 Mar 2017 20:05:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3AB30160B71 for ; Mon, 20 Mar 2017 21:05:49 +0100 (CET) Received: (qmail 57740 invoked by uid 500); 20 Mar 2017 20:05:48 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 57728 invoked by uid 99); 20 Mar 2017 20:05:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2017 20:05:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 16783DFE34; Mon, 20 Mar 2017 20:05:48 +0000 (UTC) From: steveloughran To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org Message-ID: Subject: [GitHub] spark pull request #17364: [SPARK-20038] [core]: move the currentWriter=null... Content-Type: text/plain Date: Mon, 20 Mar 2017 20:05:48 +0000 (UTC) archived-at: Mon, 20 Mar 2017 20:05:50 -0000 GitHub user steveloughran opened a pull request: https://github.com/apache/spark/pull/17364 [SPARK-20038] [core]: move the currentWriter=null assignments into finally {} … ## What changes were proposed in this pull request? have the`FileFormatWriter.ExecuteWriteTask.releaseResources()` implementations set `currentWriter=null` in a finally clause. This guarantees that if the first call to `currentWriter()` throws an exception, the second releaseResources() call made during the task cancel process will not trigger a second attempt to close the stream. ## How was this patch tested? Tricky. I've been fixing the underlying cause when I saw the problem (HADOOP-14204), but SPARK-10109 shows I'm not the first to have seen this. I can't replicate it locally any more, my code no longer being broken. code review, however, should be straightforward You can merge this pull request into a Git repository by running: $ git pull https://github.com/steveloughran/spark stevel/SPARK-20038-close Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17364.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17364 ---- commit 725740b49a2b37392699092b1b0e08c63a6152ff Author: Steve Loughran Date: 2017-03-20T19:54:51Z SPARK-20038: move the currentWriter=null assignments into finally {} clauses Change-Id: I1e07f5b90ba1a2b05978b1d65876d746d07d1f3c ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org