apurtell opened a new pull request, #2656:
URL: https://github.com/apache/phoenix/pull/2656
During read repair of unverified rows on covered global indexes, Phoenix
skip scan queries can fail with IllegalStateException indicating that a cell
seek hint does not strictly advance ("The next hint must come after previous
hint"). This failure is due to state pollution when the primary scan and a
nested read repair scan concurrently mutate a shared chain of Filter structures.
GlobalIndexScanner constructs its internal scanners, including those for
read repair, using HBase's copy constructor `new Scan(scan)`. This constructor
only performs a shallow copy of the configured Filter reference. As a result,
the primary scanner and all internal downstream scanners share the same Filter
instances. While sharing a filter chain is valid for scanners that sequentially
execute scans, this is not safe for concurrent use cases.
The fix is to avoid sharing Filter instances. This is a significant general
safety improvement because these structures are not designed to be shared.
During initialization of the repair path, GlobalIndexChecker serializes the
client filter hierarchy once via ProtobufUtil. Each subsequent
singleRowIndexScan deserializes a fresh filter instance from this byte payload
and wraps it with dedicated UnverifiedRowFilter and PagingFilter instances.
This provides complete state isolation for skip scan cursors across point
lookups at the cost of a single protobuf parse per repair, which is negligible
given the rarity of read repairs.
--
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]