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 D535B200C45 for ; Tue, 28 Mar 2017 22:15:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D3B73160B9B; Tue, 28 Mar 2017 20:15: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 24383160B6B for ; Tue, 28 Mar 2017 22:15:44 +0200 (CEST) Received: (qmail 32393 invoked by uid 500); 28 Mar 2017 20:15:44 -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 32380 invoked by uid 99); 28 Mar 2017 20:15:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2017 20:15:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D5EFCC0587 for ; Tue, 28 Mar 2017 20:15:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0_2uo8y26li6 for ; Tue, 28 Mar 2017 20:15:43 +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 C905B5FC7E for ; Tue, 28 Mar 2017 20:15: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 4E657E002F for ; Tue, 28 Mar 2017 20:15:42 +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 06D3025CDD for ; Tue, 28 Mar 2017 20:15:42 +0000 (UTC) Date: Tue, 28 Mar 2017 20:15:42 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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: Tue, 28 Mar 2017 20:15:46 -0000 [ https://issues.apache.org/jira/browse/DRILL-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945864#comment-15945864 ] Paul Rogers commented on DRILL-5023: ------------------------------------ Primarily a development issue; hard to test at the QA level. > 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 > Fix For: 1.11.0 > > > 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)