hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lil...@apache.org
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, 08 Apr 2016 08:07:52 GMT
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 <ictmalili@gmail.com>
Authored: Fri Apr 8 14:24:00 2016 +0800
Committer: Lili Ma <ictmalili@gmail.com>
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)


Mime
View raw message