Copilot commented on code in PR #2632:
URL: https://github.com/apache/phoenix/pull/2632#discussion_r4225603112
##########
phoenix-core-client/src/main/java/org/apache/phoenix/util/ScanUtil.java:
##########
@@ -948,6 +963,7 @@ public static void setLocalIndexAttributes(Scan newScan,
int keyOffset, byte[] r
byte[] regionEndKey, byte[] startRowSuffix, byte[] stopRowSuffix) {
if (ScanUtil.isLocalIndex(newScan)) {
newScan.setAttribute(SCAN_ACTUAL_START_ROW, regionStartKey);
+ newScan.setAttribute(EXPECTED_UPPER_REGION_KEY, regionEndKey);
Review Comment:
`setScanAttributesForPhoenixTTL` invokes this method again at
`ScanUtil.java:1608` with `HConstants.EMPTY_BYTE_ARRAY` as `regionEndKey`,
after `BaseResultIterators` has populated the real per-region end key. When a
local index has a serializable TTL expression, this assignment overwrites that
real key, so every non-final region fails the server-side comparison and is
reported stale. Preserve/pass through the existing expected upper key during
the TTL rewrap instead of replacing it with the empty boundary.
--
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]