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 6CF3C2009F8 for ; Fri, 3 Jun 2016 22:33:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6BCC4160A49; Fri, 3 Jun 2016 20:33: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 A4726160A3B for ; Fri, 3 Jun 2016 22:33:21 +0200 (CEST) Received: (qmail 3771 invoked by uid 500); 3 Jun 2016 20:33:20 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 3762 invoked by uid 99); 3 Jun 2016 20:33:20 -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, 03 Jun 2016 20:33:20 +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 44717C0D0F for ; Fri, 3 Jun 2016 20:33:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id jrcBWrYzfL4h for ; Fri, 3 Jun 2016 20:33:18 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id B9ACB5F242 for ; Fri, 3 Jun 2016 20:33:17 +0000 (UTC) Received: (qmail 3465 invoked by uid 99); 3 Jun 2016 20:33:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2016 20:33:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EA9C9DFD9C; Fri, 3 Jun 2016 20:33:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hbdeshmukh@apache.org To: commits@quickstep.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-quickstep git commit: Bug fixed in isFull() function. Date: Fri, 3 Jun 2016 20:33:16 +0000 (UTC) archived-at: Fri, 03 Jun 2016 20:33:22 -0000 Repository: incubator-quickstep Updated Branches: refs/heads/simple-scalar-isfull-bugfix [created] 69c65518f Bug fixed in isFull() function. - Earlier check for isFull() was that whether there is at least one empty bucket available for insertion. - Now isFull() can check if there is enough space adding specified number of buckets. - To reproduce the bug behind this fix: Run TPC-H Q2 on SF100 dataset after running the \analyze command. The optimizer allocates smaller than necessary space for one of the hash joins. The resize() is triggered but never gets executed because of the restrictive isFull() condition. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/69c65518 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/69c65518 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/69c65518 Branch: refs/heads/simple-scalar-isfull-bugfix Commit: 69c65518ff603081e724be581badffc7efeabead Parents: 50b4e55 Author: Harshad Deshmukh Authored: Fri Jun 3 15:28:52 2016 -0500 Committer: Harshad Deshmukh Committed: Fri Jun 3 15:28:52 2016 -0500 ---------------------------------------------------------------------- storage/SimpleScalarSeparateChainingHashTable.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/69c65518/storage/SimpleScalarSeparateChainingHashTable.hpp ---------------------------------------------------------------------- diff --git a/storage/SimpleScalarSeparateChainingHashTable.hpp b/storage/SimpleScalarSeparateChainingHashTable.hpp index eda6c86..962a66c 100644 --- a/storage/SimpleScalarSeparateChainingHashTable.hpp +++ b/storage/SimpleScalarSeparateChainingHashTable.hpp @@ -230,10 +230,10 @@ class SimpleScalarSeparateChainingHashTable : public HashTablebuckets_allocated.load(std::memory_order_relaxed) - >= header_->num_buckets; + // Checks that there are at least ``extra_buckets`` unallocated buckets. + inline bool isFull(const std::size_t extra_buckets) const { + return (header_->buckets_allocated.load(std::memory_order_relaxed) + + extra_buckets) >= header_->num_buckets; } // Cache the TypeID of the key. @@ -831,7 +831,7 @@ void SimpleScalarSeparateChainingHashTable