Return-Path: X-Original-To: apmail-hawq-commits-archive@minotaur.apache.org Delivered-To: apmail-hawq-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 690B918D33 for ; Fri, 8 Apr 2016 08:07:56 +0000 (UTC) Received: (qmail 97897 invoked by uid 500); 8 Apr 2016 08:07:56 -0000 Delivered-To: apmail-hawq-commits-archive@hawq.apache.org Received: (qmail 97861 invoked by uid 500); 8 Apr 2016 08:07:56 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 97851 invoked by uid 99); 8 Apr 2016 08:07: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; Fri, 08 Apr 2016 08:07: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 99BCC180481 for ; Fri, 8 Apr 2016 08:07:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 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=-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 FwyX78z_yqf2 for ; Fri, 8 Apr 2016 08:07:54 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id E70505F23F for ; Fri, 8 Apr 2016 08:07:53 +0000 (UTC) Received: (qmail 97841 invoked by uid 99); 8 Apr 2016 08:07:53 -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, 08 Apr 2016 08:07:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BF7ACDFC55; Fri, 8 Apr 2016 08:07:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lilima@apache.org To: commits@hawq.incubator.apache.org Message-Id: <282fdf5c6e694cac885c07e8aa605f92@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-hawq git commit: HAWQ-642. Make sure the number of records generated in AppendOnlyWriter equal to the number of QEs in function SetSegnoForWrite when we do insert/copy Date: Fri, 8 Apr 2016 08:07:52 +0000 (UTC) Repository: incubator-hawq Updated Branches: refs/heads/master a313c5472 -> 300d9149f HAWQ-642. Make sure the number of records generated in AppendOnlyWriter equal to the number of QEs in function SetSegnoForWrite when we do insert/copy Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/300d9149 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/300d9149 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/300d9149 Branch: refs/heads/master Commit: 300d9149fd1772ccd88f3855751d34117218de22 Parents: a313c54 Author: Lili Ma Authored: Fri Apr 8 14:24:00 2016 +0800 Committer: Lili Ma Committed: Fri Apr 8 16:07:36 2016 +0800 ---------------------------------------------------------------------- src/backend/access/appendonly/appendonlywriter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/300d9149/src/backend/access/appendonly/appendonlywriter.c ---------------------------------------------------------------------- diff --git a/src/backend/access/appendonly/appendonlywriter.c b/src/backend/access/appendonly/appendonlywriter.c index 40d097c..3c7f9a2 100644 --- a/src/backend/access/appendonly/appendonlywriter.c +++ b/src/backend/access/appendonly/appendonlywriter.c @@ -1139,7 +1139,8 @@ List *SetSegnoForWrite(List *existing_segnos, Oid relid, int segment_num, if (remaining_num > 0) { //generate new segment_num to make sure that in keepHash mode, all segment node has at least one segfile is writable - for(int i= 1; i<= segment_num; i++) + int newAllocatedNum = remaining_num; + for(int i= 1; i<= newAllocatedNum; i++) { int new_status = AORelGetSegfileStatus(aoentry); if (new_status == NEXT_END_OF_LIST)