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 C579F200C73 for ; Wed, 10 May 2017 19:47:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C4172160B9C; Wed, 10 May 2017 17:47:57 +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 14F37160B99 for ; Wed, 10 May 2017 19:47:56 +0200 (CEST) Received: (qmail 69037 invoked by uid 500); 10 May 2017 17:47:56 -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 69020 invoked by uid 99); 10 May 2017 17:47:56 -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, 10 May 2017 17:47:56 +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 82B831882F4 for ; Wed, 10 May 2017 17:47:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id TgOEm-htTsit for ; Wed, 10 May 2017 17:47:54 +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 C0B635F36C for ; Wed, 10 May 2017 17:47:53 +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 v4AHlpP7027806; Wed, 10 May 2017 17:47:51 GMT Message-Id: <201705101747.v4AHlpP7027806@ip-10-146-233-104.ec2.internal> Date: Wed, 10 May 2017 17:47:51 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dan Hecht Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5238=3A_transfer_reservations_between_trackers=0A?= X-Gerrit-Change-Id: I21f008abaf1aa4fcd2d854769a603b97589af3b3 X-Gerrit-ChangeURL: X-Gerrit-Commit: b235541b806e4a8300f4c969a51a4be9ba803f04 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, 10 May 2017 17:47:58 -0000 Tim Armstrong has posted comments on this change. Change subject: IMPALA-5238: transfer reservations between trackers ...................................................................... Patch Set 3: (5 comments) http://gerrit.cloudera.org:8080/#/c/6708/3//COMMIT_MSG Commit Message: PS3, Line 7: 5239 > wrong number Done http://gerrit.cloudera.org:8080/#/c/6708/3/be/src/runtime/bufferpool/reservation-tracker.cc File be/src/runtime/bufferpool/reservation-tracker.cc: PS3, Line 204: void ReservationTracker::DecreaseReservation(int64_t bytes) { > does this interface still make sense? i.e. do we need both this and Transfe We still need this internally to implement Close() and TransferReservationTo(). This does do something distinct from either - it releases reservation on all ancestors without closing it. TransferReservationTo() could only be used to release reservation up to the root. I don't that is really necessary though for now, so I removed the public interface and updated tests to use alternative APIs. PS3, Line 253: * 'other' is a descendent of 'this'. 'path_to_root' is empty because 'this' is the : // lowest common ancestor. To transfer, we increase the reservation on the trackers : // under 'this', down to 'other'. > isn't this the only case we need for the distribution of initial reservatio The third case is the one we need to distribute reservation - the initial reservation can't be in the query root ReservationTracker since then there's no way to prevent it being used for non-initial reservations. It needs to be in a separate "initial reservation" tracker that is a child of the query tracker (e.g. the distribution would be the same as "aunt"->"child" in the unit test). Now that I think about it, I think the underlying problem is the same as the scenario you mention - some ExecNodes won't claim their reservation until after the query has started executing, which means that in the meantime the ExecNodes initial reservation needs to be stored somewhere, then transferred. http://gerrit.cloudera.org:8080/#/c/6708/3/be/src/runtime/bufferpool/reservation-tracker.h File be/src/runtime/bufferpool/reservation-tracker.h: PS3, Line 197: Release memory on linked MemTracker > not sure what that means. should it say "to linked MemTracker"? Reworded PS3, Line 199: decrease > how about reservation_decrease to be clear this is opposite TryConsumeFromM Done -- To view, visit http://gerrit.cloudera.org:8080/6708 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21f008abaf1aa4fcd2d854769a603b97589af3b3 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes