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 EDA96200CF0 for ; Thu, 7 Sep 2017 18:10:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ED4151609C5; Thu, 7 Sep 2017 16:10:39 +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 405301609BB for ; Thu, 7 Sep 2017 18:10:39 +0200 (CEST) Received: (qmail 42365 invoked by uid 500); 7 Sep 2017 16:10:38 -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 42352 invoked by uid 99); 7 Sep 2017 16:10:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 16:10:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 93DCDC004D for ; Thu, 7 Sep 2017 16:10:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qzNOUcI7__Cw for ; Thu, 7 Sep 2017 16:10:33 +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 AC7C35F567 for ; Thu, 7 Sep 2017 16:10:32 +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 v87GAUFC023338; Thu, 7 Sep 2017 16:10:30 GMT Message-Id: <201709071610.v87GAUFC023338@ip-10-146-233-104.ec2.internal> Date: Thu, 7 Sep 2017 16:10:29 +0000 From: "Alex Behm (Code Review)" To: Bharath Vissapragada , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dimitris Tsirogiannis , Tim Armstrong , Mostafa Mokhtar Reply-To: alex.behm@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5881=3A_Use_native_allocation_while_building_catalog_updates=0A?= X-Gerrit-Change-Id: I383684effa9524734ce3c6c0fb7ed37de0e15782 X-Gerrit-ChangeURL: X-Gerrit-Commit: d3f3106426b8dd6571bf51ca879c1e67215b65c4 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.12.7 archived-at: Thu, 07 Sep 2017 16:10:40 -0000 Alex Behm has posted comments on this change. Change subject: IMPALA-5881: Use native allocation while building catalog updates ...................................................................... Patch Set 8: (8 comments) http://gerrit.cloudera.org:8080/#/c/7955/8/be/src/catalog/catalog.cc File be/src/catalog/catalog.cc: Line 116: DCHECK(len < std::numeric_limits::max()); DCHECK_LE #include Line 170: LOG(ERROR) << "Failed to free buffers. Potential memory leak of: " Failed to free native buffer through JNI. Leaked N bytes. (We definitely leaked at this point). Also include the status error message. http://gerrit.cloudera.org:8080/#/c/7955/8/fe/src/main/java/org/apache/impala/service/JniCatalog.java File fe/src/main/java/org/apache/impala/service/JniCatalog.java: Line 295: TException { Does this really throw TException? http://gerrit.cloudera.org:8080/#/c/7955/8/fe/src/main/java/org/apache/impala/thrift/NativeByteArrayOutputStream.java File fe/src/main/java/org/apache/impala/thrift/NativeByteArrayOutputStream.java: Line 94: private void tryAllocate(long len, boolean reAllocate) { Can we simplify this to just always use reallocateMemory()? Realloc from a 0 ptr should be ok I think. Line 95: try { Preconditions.checkState(bufferPtr_ >= 0); for clarity why the free in L114 is always ok Line 113: } catch (Exception e) { catch Throwable for extra paranoia Line 139: if (newBufferSize >= BUFFER_MAX_SIZE_LIMIT) { || newBufferSize < 0 (overflow) Line 155: public synchronized void reset() {} What's this for? Is it an @Override? -- To view, visit http://gerrit.cloudera.org:8080/7955 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I383684effa9524734ce3c6c0fb7ed37de0e15782 Gerrit-PatchSet: 8 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Bharath Vissapragada Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Bharath Vissapragada Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Mostafa Mokhtar Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes