apurtell opened a new pull request, #2657:
URL: https://github.com/apache/phoenix/pull/2657

   During server-side scan execution Phoenix builds result rows for aggregation 
and state tracking using ByteUtil.getLargestPossibleRowKeyInRange(). This 
utility should construct a synthetic key that falls within the active scan's 
boundaries so that downstream client verification logic accepts the payload. In 
the table's end region, the upper limit is an empty byte array 
(HConstants.EMPTY_END_ROW), conceptually representing positive infinity rather 
than a literal byte sequence.
   
   However, because lexicographical comparison places any non-empty byte array 
after an empty array, the check misinterprets the conceptual indication of 
positive infinity / no end to the range as a zero-length empty start of the 
range. An assertion fails, logs a misleading error, and returns null. Callers 
then fall back to degenerate keys, such as the start key, stop row, or an empty 
key, which fail subsequent client side range checks and this can cause valid 
results to be discarded during background workloads like index builds, dropping 
out rows from the rebuild.
   
   The fix makes ByteUtil consistent with the client side region boundary 
contract defined in ScanUtil.verifyKeyInScanRange(). An empty end key is 
treated as an unbounded range, skipping the upper limit comparison entirely.


-- 
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