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 2631C200C1E for ; Fri, 17 Feb 2017 23:23:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 24C8D160B46; Fri, 17 Feb 2017 22:23:25 +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 6D74C160B57 for ; Fri, 17 Feb 2017 23:23:24 +0100 (CET) Received: (qmail 34997 invoked by uid 500); 17 Feb 2017 22:23:23 -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 34988 invoked by uid 99); 17 Feb 2017 22:23:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2017 22:23:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3ECE11A0103 for ; Fri, 17 Feb 2017 22:23:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 15BReSI-2oza for ; Fri, 17 Feb 2017 22:23:22 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E0B865F4AC for ; Fri, 17 Feb 2017 22:23:21 +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 E56AEE081D for ; Fri, 17 Feb 2017 22:22:44 +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 4C92424123 for ; Fri, 17 Feb 2017 22:22:44 +0000 (UTC) Date: Fri, 17 Feb 2017 22:22:44 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (DRILL-5023) ExternalSortBatch does not spill fully, throws off spill calculations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 17 Feb 2017 22:23:25 -0000 [ https://issues.apache.org/jira/browse/DRILL-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Rogers resolved DRILL-5023. -------------------------------- Resolution: Fixed > ExternalSortBatch does not spill fully, throws off spill calculations > --------------------------------------------------------------------- > > Key: DRILL-5023 > URL: https://issues.apache.org/jira/browse/DRILL-5023 > Project: Apache Drill > Issue Type: Sub-task > Affects Versions: 1.8.0 > Reporter: Paul Rogers > Assignee: Paul Rogers > Priority: Minor > > The {{ExternalSortBatch}} (ESB) operator sorts records, spilling to disk as needed to operate within a defined memory budget. > When needed, ESB spills accumulated record batches to disk. However, when doing so, the ESB carves off the first spillable batch and holds it in memory: > {code} > // 1 output container is kept in memory, so we want to hold on to it and transferClone > // allows keeping ownership > VectorContainer c1 = VectorContainer.getTransferClone(outputContainer, oContext); > c1.buildSchema(BatchSchema.SelectionVectorMode.NONE); > c1.setRecordCount(count); > ... > BatchGroup newGroup = new BatchGroup(c1, fs, outputFile, oContext); > {code} > When the spill batch size gets larger (to fix DRILL-5022), the result is that nothing is spilled as the first spillable batch is simply stored back into memory on the (supposedly) spilled batches list. > The desired behavior is for all spillable batches to be written to disk. If the first batch is held back to work around some issue (to keep a schema, say?), then fine a different solution that allows the actual data to spill. -- This message was sent by Atlassian JIRA (v6.3.15#6346)