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 DE126200ACA for ; Thu, 19 May 2016 00:12:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DCA30160A15; Wed, 18 May 2016 22:12:17 +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 316DF160A00 for ; Thu, 19 May 2016 00:12:17 +0200 (CEST) Received: (qmail 31256 invoked by uid 500); 18 May 2016 22:12:16 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 31245 invoked by uid 99); 18 May 2016 22:12:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2016 22:12:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C5B1618056A for ; Wed, 18 May 2016 22:12:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rDUAtZ3uUFRy for ; Wed, 18 May 2016 22:12:14 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id D6A455F484 for ; Wed, 18 May 2016 22:12:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u4IMCCGS002138; Wed, 18 May 2016 22:12:12 GMT Message-Id: <201605182212.u4IMCCGS002138@ip-10-146-233-104.ec2.internal> Date: Wed, 18 May 2016 22:12:06 +0000 From: "Michael Ho (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, dev@impala.incubator.apache.org Reply-To: kwho@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?[Impala-CR](cdh5-2.6.0=5F5.8.0)_IMPALA-3332:_Free_local_allocations_in_sorter.=0A?= X-Gerrit-Change-Id: I941729b4836e5dbb827d4313a0b45bc5df2fa8e1 X-Gerrit-ChangeURL: X-Gerrit-Commit: 2de245d655f407f158b14807c1917c91c83b1af2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.10-rc0 archived-at: Wed, 18 May 2016 22:12:18 -0000 Hello Tim Armstrong, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/3116 to look at the new patch set (#5). Change subject: IMPALA-3332: Free local allocations in sorter. ...................................................................... IMPALA-3332: Free local allocations in sorter. Sorter can have runaway memory consumption as it never frees local allocations made in comparator_.Less(). In addition, it doesn't check for errors generated during expression evaluation so it may keep sorting even after failures have occurred. This change fixes the problem by freeing local allocations for every n invocations of comparator_.Less() where n is the row batch size specified in the query options. Various error checks are also added to return early if any error is encountered. Change-Id: I941729b4836e5dbb827d4313a0b45bc5df2fa8e1 --- M be/src/runtime/sorted-run-merger.cc M be/src/runtime/sorter.cc M be/src/util/tuple-row-compare.h M testdata/workloads/functional-query/queries/QueryTest/spilling.test 4 files changed, 91 insertions(+), 52 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/16/3116/5 -- To view, visit http://gerrit.cloudera.org:8080/3116 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I941729b4836e5dbb827d4313a0b45bc5df2fa8e1 Gerrit-PatchSet: 5 Gerrit-Project: Impala Gerrit-Branch: cdh5-2.6.0_5.8.0 Gerrit-Owner: Michael Ho Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Tim Armstrong