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 27348200C47 for ; Thu, 16 Mar 2017 00:59:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 25BB4160B7C; Wed, 15 Mar 2017 23:59:22 +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 6FE72160B78 for ; Thu, 16 Mar 2017 00:59:21 +0100 (CET) Received: (qmail 72064 invoked by uid 500); 15 Mar 2017 23:59:20 -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 72053 invoked by uid 99); 15 Mar 2017 23:59:20 -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, 15 Mar 2017 23:59:20 +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 E1014180B10 for ; Wed, 15 Mar 2017 23:59:19 +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 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 S5OePXusbVSH for ; Wed, 15 Mar 2017 23:59:19 +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 C6B7460DFC for ; Wed, 15 Mar 2017 23:59:18 +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 v2FNxDnU006905; Wed, 15 Mar 2017 23:59:13 GMT Message-Id: <201703152359.v2FNxDnU006905@ip-10-146-233-104.ec2.internal> Date: Wed, 15 Mar 2017 23:59:13 +0000 From: "Dan Hecht (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: dhecht@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4674=3A_Part_1=3A_port_BufferedTupleStream_to_BufferPool=0A?= X-Gerrit-Change-Id: I7bb47a818564ac19a6be4ca88db0578f4ea0b709 X-Gerrit-ChangeURL: X-Gerrit-Commit: c2c50c085183a2fd60fc9d1ebb43ac8dc74555d2 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: Wed, 15 Mar 2017 23:59:22 -0000 Dan Hecht has posted comments on this change. Change subject: IMPALA-4674: Part 1: port BufferedTupleStream to BufferPool ...................................................................... Patch Set 11: Code-Review+2 (7 comments) http://gerrit.cloudera.org:8080/#/c/5811/11/be/src/runtime/buffered-tuple-stream-v2.cc File be/src/runtime/buffered-tuple-stream-v2.cc: Line 176: CHECK_CONSISTENCY(); maybe move these CHECK_CONSISTECY() to the end of the functions so they validate the resulting state, but feel free to ignore. Line 270: RETURN_IF_ERROR(PinPageIfNeeded(write_page_, pinned_)); wouldn't it be better to move this to AdvanceWritePage()? The other callers handle it for their specific case (i.e. by calling PrepareForReadInternal(), or not needing it), so this is really just for when we're adding a new write page to an existing stream, no? Line 299: // May need to pin the new page for both reading and writing. Add: "See ExpectedPinCount()." since that's where we really document how we manage reservations/pins. Line 374: pinned_ || buffer_pool_client_->reservation()->IncreaseReservationToFit(page_len_); let's add a comment, something like: // If already pinned, no additional pin is needed (see ExpectedPinCount()). Line 443: MemTracker* tracker, scoped_ptr* batch, bool* got_rows) { you don't have to do it now, but I kinda think this function should be in PHJ. It's really just a composition of buffered-tuple-stream operations, and it's not something that we should be doing generally. http://gerrit.cloudera.org:8080/#/c/5811/11/be/src/runtime/buffered-tuple-stream-v2.h File be/src/runtime/buffered-tuple-stream-v2.h: PS11, Line 498: and to pin it for reading if the stream's current : /// state requires it. see comment in cc file on this function. if you take that suggestion, then update this. PS11, Line 518: write iterator is iterators are -- To view, visit http://gerrit.cloudera.org:8080/5811 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7bb47a818564ac19a6be4ca88db0578f4ea0b709 Gerrit-PatchSet: 11 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes