-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](paimon) Fix Paimon time-travel tag reads for expired snapshots #60166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run external |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
TPC-H: Total hot run time: 31070 ms |
TPC-DS: Total hot run time: 171826 ms |
ClickBench: Total hot run time: 26.66 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…60166) ### What problem does this PR solve? - Related PR: #53327 ## Problem Queries like `FOR VERSION AS OF '<tag>'` fail when the tag points to a snapshot whose snapshot file has expired, even though the tag is still valid and data should be retained by tag. ## Root Cause Doris always translated time-travel requests into `scan.snapshot-id`. Paimon validates snapshot-id against the current snapshot range; once a snapshot file is expired, it is out of range and the query fails. Tag-based reads should use `scan.tag-name` instead, which bypasses that snapshot range validation. ## Fix Use `scan.tag-name` for tag-based time travel (`@tag` and `FOR VERSION AS OF '<tag>'`), and keep `scan.snapshot-id` only for numeric snapshot-id queries. Add regression coverage that: - validates tag reads succeed after snapshot expiration - validates direct snapshot-id reads against expired snapshots still fail
What problem does this PR solve?
Problem
Queries like
FOR VERSION AS OF '<tag>'fail when the tag points to a snapshot whose snapshot file has expired, even though the tag is still valid and data should be retained by tag.Root Cause
Doris always translated time-travel requests into
scan.snapshot-id. Paimon validates snapshot-id against the current snapshot range; once a snapshot file is expired, it is out of range and the query fails. Tag-based reads should usescan.tag-nameinstead, which bypasses that snapshot range validation.Fix
Use
scan.tag-namefor tag-based time travel (@tagandFOR VERSION AS OF '<tag>'), and keepscan.snapshot-idonly for numeric snapshot-id queries. Add regression coverage that:Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)