Andrew Kyle Purtell created PHOENIX-7894:
--------------------------------------------
Summary: Populate EXPECTED_UPPER_REGION_KEY on local-index scans
Key: PHOENIX-7894
URL: https://issues.apache.org/jira/browse/PHOENIX-7894
Project: Phoenix
Issue Type: Sub-task
Affects Versions: 5.3.1, 5.4.0
Reporter: Andrew Kyle Purtell
Assignee: Andrew Kyle Purtell
See parent issue for details on the bug and related test failure and findings.
We should set {{EXPECTED_UPPER_REGION_KEY}} on local index scans, making the
server check independent of whether it is a forward or reverse scan, and fixing
the erroneous use of {{scan.getStopRow()}}. Something like:
{noformat}
public static void setLocalIndexAttributes(Scan newScan, int keyOffset, byte[]
regionStartKey,
byte[] regionEndKey, byte[] startRowSuffix, byte[] stopRowSuffix) {
if (ScanUtil.isLocalIndex(newScan)) {
newScan.setAttribute(SCAN_ACTUAL_START_ROW, regionStartKey);
newScan.setAttribute(EXPECTED_UPPER_REGION_KEY, regionEndKey); // NEW
newScan.withStartRow(regionStartKey);
newScan.withStopRow(regionEndKey);
// ... unchanged ...
}
}
{noformat}
This restores the original design intent without weakening split detection.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)