[ 
https://issues.apache.org/jira/browse/PHOENIX-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla updated PHOENIX-1059:
---------------------------------------------
    Attachment: PHOENIX-1059_v2.patch

Here is the patch addressing Jeffrey's review comments.
bq. Should you check system schema?
Changed to check for system schema.
bq. You don't have to check "rmt!=null"
done.
bq. Should the condition be 
"Bytes.compareTo(mergedRegions.getFirst().getStartKey(), splitRow) != 0"?
Equal check is correct only [~jeffreyz] For first region in the merge regions 
the start key in the storefiles is equal to merged region so we need not 
replace any thing.

bq.  In else block, parentRegion & childRegion will have some value? This part 
you may can explain a little bit more.(adding comments?)
With merge logic the parent and child regions become confusing. Actually parent 
region used to find actual start key stored in hfiles. So instead of parent 
region passing regionStartKeyinHFile. Now it won't be confused.
bq. getIndexRegion & getDataRegion will return null. I scanned the code and 
seem not all referencing places are checking null. In addition, I see very 
similar code in IndexUtil already.
Added null check where ever possible and avoided duplicate code.

[~ram_krish]
bq. The reference files that the merge creates will always have the first 
region start key as its split key right?
Yes, while creating the reference files start key considers as split point.

> Support index regions merge on their corresponding data regions merge
> ---------------------------------------------------------------------
>
>                 Key: PHOENIX-1059
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1059
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: rajeshbabu
>            Assignee: Rajeshbabu Chintaguntla
>         Attachments: PHOENIX-1059.patch, PHOENIX-1059_v2.patch
>
>
> When data regions merge corresponding index regions with the same start keys 
> also should merge. Check how we can replace the start key in the second 
> region data with first region start key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to