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 DCE1B200CD9 for ; Thu, 20 Jul 2017 08:09:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DB4AD16A89B; Thu, 20 Jul 2017 06:09:48 +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 2C84B16A899 for ; Thu, 20 Jul 2017 08:09:48 +0200 (CEST) Received: (qmail 21571 invoked by uid 500); 20 Jul 2017 06:09:47 -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 21555 invoked by uid 99); 20 Jul 2017 06:09:47 -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, 20 Jul 2017 06:09:47 +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 9DD3EC32FD for ; Thu, 20 Jul 2017 06:09:46 +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-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id pnU53agyw_tp for ; Thu, 20 Jul 2017 06:09:35 +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 1E2DA5F23A for ; Thu, 20 Jul 2017 06:09:35 +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 v6K69Y3W003310; Thu, 20 Jul 2017 06:09:34 GMT Message-Id: <201707200609.v6K69Y3W003310@ip-10-146-233-104.ec2.internal> Date: Thu, 20 Jul 2017 06:09:32 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Michael Ho Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5676=3A_avoid_expensive_consistency_checks_in_BTSv2=0A?= X-Gerrit-Change-Id: I8b380fcd0568cb73b36a490954bcd316db969ede X-Gerrit-ChangeURL: X-Gerrit-Commit: 0017cb990fbd124e3b6c1b8c93bfa06e2ac7a642 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, 20 Jul 2017 06:09:49 -0000 Tim Armstrong has uploaded a new patch set (#3). Change subject: IMPALA-5676: avoid expensive consistency checks in BTSv2 ...................................................................... IMPALA-5676: avoid expensive consistency checks in BTSv2 Doing an O(n) consistency check every time the read or write page was advanced results in O(n^2) overall runtime. The fix is to separate the O(1) and O(n) checks and only do the O(n) checks if: * The function does an an O(n) pass over the pages anyway (e.g. PinStream()) * The function is called only once per read or write pass over the stream. This should make the cost of the checks O(n) (if we make the reasonable assumption that PrepareForWrite(), PrepareForRead(), PinStream() and UnpinStream() are called a bounded number of times per stream). Testing: Ran BufferedTupleStreamV2Test. Change-Id: I8b380fcd0568cb73b36a490954bcd316db969ede --- M be/src/runtime/buffered-tuple-stream-v2.cc M be/src/runtime/buffered-tuple-stream-v2.h 2 files changed, 46 insertions(+), 28 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/59/7459/3 -- To view, visit http://gerrit.cloudera.org:8080/7459 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8b380fcd0568cb73b36a490954bcd316db969ede Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Tim Armstrong