[
https://issues.apache.org/jira/browse/PHOENIX-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14172430#comment-14172430
]
rajeshbabu commented on PHOENIX-1313:
-------------------------------------
[~jamestaylor]
Your patch looks good. I have uploaded it with two minor changes to make the
test case pass.
1) Sometimes after prefixing region start key the scan boundaries may cross the
original stop key. In such case just setting original stop key as stop row to
the scan in ScanRanges.java
{code}
if (originalStopKey.length > 0 && Bytes.compareTo(scanStopKey,
originalStopKey) > 0) {
scanStopKey = originalStopKey;
}
{code}
2) Some times after prefixing the start row becoming more than original stop
row then we are skipping to scan the region. Changed the test case according.
In the test case we can see the above scenarios after splitting region with 'j'
as split key.
{code}
assertEquals(
"CLIENT PARALLEL "
+ ((strings[3 * i].compareTo("j") < 0) ? (4 + i) :
(4 + i - 1))
+ "-WAY RANGE SCAN OVER "
+
MetaDataUtil.getLocalIndexTableName(DATA_TABLE_NAME) + " [-32767]\n"
+ "CLIENT MERGE SORT",
QueryUtil.getExplainPlan(rs));
rs = conn1.createStatement().executeQuery(query);
{code}
Please have a look at PHOENIX-1313_7.patch
Thanks.
> 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, PHOENIX-1313_5.patch, PHOENIX-1313_6.patch,
> PHOENIX-1313_7.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)