Return-Path: X-Original-To: apmail-impala-dev-archive@minotaur.apache.org Delivered-To: apmail-impala-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B793A1888C for ; Fri, 26 Feb 2016 07:33:30 +0000 (UTC) Received: (qmail 14886 invoked by uid 500); 26 Feb 2016 07:33:30 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 14847 invoked by uid 500); 26 Feb 2016 07:33:30 -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 14836 invoked by uid 99); 26 Feb 2016 07:33:30 -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; Fri, 26 Feb 2016 07:33:30 +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 7AC9CC068C for ; Fri, 26 Feb 2016 07:33:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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 mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Kp8axZ2ft6Gd for ; Fri, 26 Feb 2016 07:33:28 +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-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D607E5FAED for ; Fri, 26 Feb 2016 07:33:27 +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 u1Q7XQZG013737; Fri, 26 Feb 2016 07:33:26 GMT Message-Id: <201602260733.u1Q7XQZG013737@ip-10-146-233-104.ec2.internal> Date: Fri, 26 Feb 2016 07:33:26 +0000 From: "Dan Hecht (Code Review)" To: Michael Ho , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Skye Wanderman-Milne , Huaisi Xu Reply-To: dhecht@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?[Impala-CR](cdh5-2.5.0=5F5.7.0)_IMPALA-3085:_Unregister_data_sinks'_MemTrackers_at_their_Close()_functions.=0A?= X-Gerrit-Change-Id: I3aec82150a933dc2b261beff41f5f4f022501bfb X-Gerrit-ChangeURL: X-Gerrit-Commit: b5e6d7ccf4dd27b31d283a6e4ad1d9ce7f1ede3d 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 Dan Hecht has posted comments on this change. Change subject: IMPALA-3085: Unregister data sinks' MemTrackers at their Close() functions. ...................................................................... Patch Set 3: Code-Review+2 (1 comment) > (2 comments) > > Yes, I had the same question. It seems we only set auto_unregister_ > to true for the query wide MemTracker and request pool MemTracker > but not for other MemTrackers. My impression is that it was > expecting the callers to clean up properly although we should > revisit whether it makes sense to have it as the default behavior > after this release. We should only do memory management in the destructor (i.e. free memory owned by this object). In other words, let's restrict destructors to be our "garbage collector" but any control logic should be done at an explicit point during the query lifecycle (such as Close()). So, I don't think we should increase usage of "auto_unregister" (instead we should get rid of it). http://gerrit.cloudera.org:8080/#/c/2314/3/be/src/exec/hdfs-sequence-table-writer.cc File be/src/exec/hdfs-sequence-table-writer.cc: Line 310: mem_pool_->FreeAll(); hmm looks like the mem_pool_ itself is never deleted also (other writers have this as a scoped_ptr). -- To view, visit http://gerrit.cloudera.org:8080/2314 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3aec82150a933dc2b261beff41f5f4f022501bfb Gerrit-PatchSet: 3 Gerrit-Project: Impala Gerrit-Branch: cdh5-2.5.0_5.7.0 Gerrit-Owner: Michael Ho Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Huaisi Xu Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Skye Wanderman-Milne Gerrit-HasComments: Yes