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 AD58B200D19 for ; Fri, 22 Sep 2017 03:06:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ABDD91609E4; Fri, 22 Sep 2017 01:06:51 +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 F0AE51609E1 for ; Fri, 22 Sep 2017 03:06:50 +0200 (CEST) Received: (qmail 85728 invoked by uid 500); 22 Sep 2017 01:06:50 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 85716 invoked by uid 99); 22 Sep 2017 01:06:49 -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; Fri, 22 Sep 2017 01:06:49 +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 5F8FC18FEB0 for ; Fri, 22 Sep 2017 01:06:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.362 X-Spam-Level: ** X-Spam-Status: No, score=2.362 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-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 YKuqabMKymdN for ; Fri, 22 Sep 2017 01:06:48 +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 mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 799DF5FBDF for ; Fri, 22 Sep 2017 01:06:47 +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 v8M16knv022632; Fri, 22 Sep 2017 01:06:46 GMT Message-Id: <201709220106.v8M16knv022632@ip-10-146-233-104.ec2.internal> X-Gerrit-PatchSet: 6 Date: Fri, 22 Sep 2017 01:06:46 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5844=3A_use_a_MemPool_for_expr_local_allocations=0A?= X-Gerrit-Change-Id: I4ba5a7542ed90a49a4b5586c040b5985a7d45b61 X-Gerrit-Change-Number: 8025 X-Gerrit-ChangeURL: X-Gerrit-Commit: 4ebda83fbe8ed09700f98f1927a706143ab8e0e5 In-Reply-To: References: X-Gerrit-Comment-Date: Fri, 22 Sep 2017 01:06:46 +0000 Reply-To: tarmstrong@cloudera.com, impala-cr@cloudera.com, marcelk@gmail.com, reviews@impala.incubator.apache.org, dhecht@cloudera.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.14.2 Content-Type: multipart/alternative; boundary="91K0Qo6ao7w="; charset=UTF-8 archived-at: Fri, 22 Sep 2017 01:06:51 -0000 --91K0Qo6ao7w= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Tim Armstrong has posted comments on this change=2E ( http://gerrit=2Ecloud= era=2Eorg:8080/8025 ) Change subject: IMPALA-5844: use a MemPool for expr = local allocations =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E Patch Set 6: (4 comments) http://gerrit=2Ecloudera=2Eorg:8080/#/c/8= 025/6//COMMIT_MSG Commit Message: http://gerrit=2Ecloudera=2Eorg:8080/#/c/= 8025/6//COMMIT_MSG@13 PS6, Line 13: * They are freed in bulk at various poi= nts in query execution=2E > we don't have to do it that way though=2E Manag= ing the expr allocations in bulk like this makes sense to me - trying to tr= ack the lifetime of individual allocations would add a lot of complexity an= d runtime overhead and I think also be a breaking changes for the UDF inter= face=2E The operator code is the only code that knows when the results of = expr evaluation are no longer needed so it makes sense to me that it would = be responsible for freeing them=2E In a lot of cases it would be possible = to free the local allocations more frequently, e=2Eg=2E after each expr eva= luation (e=2Eg=2E for EvalConjuncts() where no var-len data can be returned= ) but I think that would add a lot of runtime overhead=2E http://gerrit= =2Ecloudera=2Eorg:8080/#/c/8025/6//COMMIT_MSG@31 PS6, Line 31: Remove Funct= ionContext::ReallocateLocal() > is that a UDF breaking change? It was never= exposed in udf=2Eh so should be fine - it was only added to support String= Val::Resize() http://gerrit=2Ecloudera=2Eorg:8080/#/c/8025/6/be/src/exec/= exec-node=2Eh File be/src/exec/exec-node=2Eh: http://gerrit=2Ecloudera=2Eo= rg:8080/#/c/8025/6/be/src/exec/exec-node=2Eh@324 PS6, Line 324: expr-manage= d > what does that mean, especially given that it can be used by multiple = evalu Not sure of a better way of expressing it=2E The lifetime of the mem= ory is tied to the lifetime of the evaluators - it can only be freed when t= he evaluators are closed since it backs the FreePools and a few other thing= s=2E http://gerrit=2Ecloudera=2Eorg:8080/#/c/8025/6/be/src/runtime/free-p= ool=2Eh File be/src/runtime/free-pool=2Eh: http://gerrit=2Ecloudera=2Eorg:= 8080/#/c/8025/6/be/src/runtime/free-pool=2Eh@a69 PS6, Line 69: > why does = this go away? It was moved to FunctionContext, which is the only user of Fr= eePool=2E With the change to the local allocations coming from a MemPool th= ey can't be intercepted here any more=2E -- To view, visit http://gerri= t=2Ecloudera=2Eorg:8080/8025 To unsubscribe, visit http://gerrit=2Ecloudera= =2Eorg:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerr= it-MessageType: comment Gerrit-Change-Id: I4ba5a7542ed90a49a4b5586c040b5985= a7d45b61 Gerrit-Change-Number: 8025 Gerrit-PatchSet: 6 Gerrit-Owner: Tim Ar= mstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Tim Armstrong Gerr= it-Comment-Date: Fri, 22 Sep 2017 01:06:46 +0000 Gerrit-HasComments: Yes --91K0Qo6ao7w=--