Copilot commented on code in PR #2632:
URL: https://github.com/apache/phoenix/pull/2632#discussion_r4225547153


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/BaseScannerRegionObserver.java:
##########
@@ -89,7 +91,8 @@ private static void throwIfScanOutOfRegion(Scan scan, Region 
region)
     if (isLocalIndex) {
       // For local indexes we have to abort any scan that was open during a 
split.
       // We detect that condition as follows:
-      // 1. The scanner's stop row has to always match the region's end key.
+      // 1. The EXPECTED_UPPER_REGION_KEY attribute has to always match the 
region's end key.
+      // Older clients do not set the attribute. For them, the scan's stop row 
is the fallback.

Review Comment:
   The fallback still breaks reversed scans from older clients that already 
perform the client-side boundary swap but do not send 
`EXPECTED_UPPER_REGION_KEY`: their region end key is in `getStartRow()`, while 
`getStopRow()` is the region start key, so every non-degenerate region is 
rejected as stale. Since the comment explicitly preserves older-client 
compatibility, select the fallback by `scan.isReversed()` (and add the 
corresponding reversed compatibility case to the test).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to