Backport to branch(3.17) : Fix index-based Get/Scan to filter out results whose index key no longer matches after lazy recovery rollback#3503
Conversation
…ger matches after lazy recovery rollback (#3488)
There was a problem hiding this comment.
Code Review
This pull request introduces logic to filter out results after a lazy recovery (rollback) if the index column value no longer matches the queried index key. It also updates the snapshot caching mechanism to prevent caching a record as absent when it was actually filtered out due to an index key mismatch or conjunctions. Comprehensive unit and integration tests have been added to verify these changes. One review comment suggests improving the robustness of the resultMatchesIndexKey method to avoid a potential IndexOutOfBoundsException if assertions are disabled.
There was a problem hiding this comment.
Code Review
This pull request introduces logic to filter out results in index-based read and scan operations when a record is rolled back during lazy recovery and its index column value no longer matches the query. It also includes a fix to prevent incorrect caching of empty results in the transaction snapshot in these cases. Comprehensive unit and integration tests have been added to verify the filtering behavior across different transaction states and isolation levels. I have no feedback to provide.
This is an automated backport of the following:
Please merge this PR after all checks have passed.