You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2026/06/10 20:05:00 UTC

[jira] [Updated] (PHOENIX-7894) Set EXPECTED_UPPER_REGION_KEY on local-index scans

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

Andrew Kyle Purtell updated PHOENIX-7894:
-----------------------------------------
    Summary: Set EXPECTED_UPPER_REGION_KEY on local-index scans  (was: Populate EXPECTED_UPPER_REGION_KEY on local-index scans)

> Set 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.4.0, 5.3.1
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Major
>
> 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)