Github user hsyuan commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1187#discussion_r108025472
  
    --- Diff: src/backend/access/appendonly/appendonlywriter.c ---
    @@ -1136,26 +1140,22 @@ List *SetSegnoForWrite(List *existing_segnos, Oid 
relid, int segment_num,
                 /* If the found segfile status are still no enough,
                  * we need to get new ones from the status pool.
                  */
    -            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
    -                int newAllocatedNum = remaining_num;
    -                for(int i= 1; i<= newAllocatedNum; i++)
    -                {
    -                    int new_status = AORelGetSegfileStatus(aoentry);
    -                    if (new_status == NEXT_END_OF_LIST)
    -                    {
    -                        LWLockRelease(AOSegFileLock);
    -                        ereport(ERROR, (errmsg("cannot open more than %d 
append-only table segment files cocurrently",
    -                                        MaxAORelSegFileStatus)));
    -                    }
    -                    AOSegfileStatusPool[new_status].segno = 
++aoentry->max_seg_no;
    -                    AOSegfileStatusPool[new_status].next = 
aoentry->head_rel_segfile.next;
    -                    aoentry->head_rel_segfile.next = new_status;
    -                    remaining_num = addCandidateSegno(maxSegno4Segment, 
segment_num,  &AOSegfileStatusPool[new_status], keepHash);
    -                }
    -                Assert(remaining_num==0);//make sure all segno got a 
candidate
    -            }
    +                   while(remaining_num>0)
    +                   {
    +                           //generate new segment_num to make sure that in 
keepHash mode, all segment node has at least one segfile is writable
    +                           int new_status = AORelGetSegfileStatus(aoentry);
    +                           if (new_status == NEXT_END_OF_LIST)
    +                           {
    +                                   LWLockRelease(AOSegFileLock);
    +                                   ereport(ERROR, (errmsg("cannot open 
more than %d append-only table segment files cocurrently",
    --- End diff --
    
    `cocurrently` typo


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to