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 03FDB200C45 for ; Tue, 28 Mar 2017 22:13:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0274A160B89; Tue, 28 Mar 2017 20:13:45 +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 4A77B160B6B for ; Tue, 28 Mar 2017 22:13:44 +0200 (CEST) Received: (qmail 29636 invoked by uid 500); 28 Mar 2017 20:13:43 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 29627 invoked by uid 99); 28 Mar 2017 20:13:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2017 20:13:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 1D668C086E for ; Tue, 28 Mar 2017 20:13:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GKEtPjmrfk88 for ; Tue, 28 Mar 2017 20:13:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 60E145F253 for ; Tue, 28 Mar 2017 20:13:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DBC3CE002F for ; Tue, 28 Mar 2017 20:13:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9208525CE7 for ; Tue, 28 Mar 2017 20:13:41 +0000 (UTC) Date: Tue, 28 Mar 2017 20:13:41 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5055) External Sort does not delete spill file if error occurs during close MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Mar 2017 20:13:45 -0000 [ https://issues.apache.org/jira/browse/DRILL-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945858#comment-15945858 ] Paul Rogers commented on DRILL-5055: ------------------------------------ Hard to verify for QA. Verified with a unit test. > External Sort does not delete spill file if error occurs during close > --------------------------------------------------------------------- > > Key: DRILL-5055 > URL: https://issues.apache.org/jira/browse/DRILL-5055 > Project: Apache Drill > Issue Type: Sub-task > Affects Versions: 1.8.0 > Reporter: Paul Rogers > Assignee: Paul Rogers > Priority: Minor > Fix For: 1.11.0 > > > DRILL-3898 recently fixed a case in which disk space was exhausted during a spill event for the external sort. In this case, the call to close failed because close attempted to flush remaining buffered data, but that also failed due to out of space. > While the fix works, the fix causes the partially-completed spill file to be left on disk. Consider this code in {{BatchGroup.close( )}} > {code} > if (outputStream != null) { > outputStream.close(); > } > ... > if (fs != null && fs.exists(path)) { > fs.delete(path, false); > } > {code} > Notice that, if the output stream close fails, the spill file is not deleted. The fix is to put the delete in a finally block so that it is always deleted. -- This message was sent by Atlassian JIRA (v6.3.15#6346)