[ 
https://issues.apache.org/jira/browse/PHOENIX-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14170731#comment-14170731
 ] 

rajeshbabu edited comment on PHOENIX-1313 at 10/14/14 11:56 AM:
----------------------------------------------------------------

[~jamestaylor]
with below two more changes it's passing.
1)
{code}
List<List<Scan>> newNestedScans = this.getParallelScans(oldScan.getStartRow(), 
oldScan.getStopRow());
{code}
Here for local indexes stop row should be value of EXPECTED_UPPER_REGION_KEY 
attribute in the scan object which is end key of old region.

2)
{code}
        // Merge bisect with guideposts for all but the last region
        while (regionIndex <= stopIndex) {
            byte[] currentGuidePost, endRegionKey, endKey;
            if (regionIndex == stopIndex) {
                endKey = stopKey;
                endRegionKey = ByteUtil.EMPTY_BYTE_ARRAY;
            } else {
                endKey = endRegionKey = regionBoundaries.get(regionIndex);
            }
{code}
Even If stopIndex is any of the region index other than last region still we 
are assigning endRegionKey with empty byte array which is not correct. It 
should be regionBoundaries.get(stopIndex). If stopIndex is equal to 
regionLocations size then we can assign with empty byte array. 
It should be 
{code}
        while (regionIndex <= stopIndex) {
            byte[] currentGuidePost, endRegionKey, endKey;
            if (regionIndex == stopIndex) {
                endKey = stopKey;
            } else {
                endKey = regionBoundaries.get(regionIndex);
            }
            endRegionKey =
                    regionIndex == regionLocations.size() ? 
ByteUtil.EMPTY_BYTE_ARRAY
                            : regionBoundaries.get(regionIndex);
{code}

Thanks.


was (Author: rajesh23):
List<List<Scan>> newNestedScans = this.getParallelScans(oldScan.getStartRow(), 
oldScan.getStopRow());

Here for local indexes stop row should be value of EXPECTED_UPPER_REGION_KEY 
attribute in the scan object which is end key of old region.

> Investigate why LocalIndexIT.testLocalIndexScanAfterRegionSplit() is failing
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-1313
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1313
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2
>            Reporter: James Taylor
>            Assignee: rajeshbabu
>             Fix For: 5.0.0, 4.2
>
>         Attachments: PHOENIX-1313.patch, PHOENIX-1313_2.patch, 
> PHOENIX-1313_4.patch
>
>
> I checked in a fairly big change 
> (https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=commit;h=d018cc1c6e01d9836de6e67af4f8b91de3269bfd)
>  to improve encapsulation and fix a bunch of stats issues, and the following 
> test started failing: LocalIndexIT.testLocalIndexScanAfterRegionSplit(). I 
> tried to diagnose it, but that test is complicated. Would you mind taking a 
> look [~rajesh23]?



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

Reply via email to