Skip to content

[lake] Fix DvTableReadableSnapshotRetriever scanning wrong snapshot#3396

Open
luoyuxia wants to merge 1 commit into
apache:mainfrom
luoyuxia:fix/dv-snapshot-scan-options
Open

[lake] Fix DvTableReadableSnapshotRetriever scanning wrong snapshot#3396
luoyuxia wants to merge 1 commit into
apache:mainfrom
luoyuxia:fix/dv-snapshot-scan-options

Conversation

@luoyuxia
Copy link
Copy Markdown
Contributor

Summary

  • getBucketsWithoutL0AndWithL0() passed SCAN_SNAPSHOT_ID and BATCH_SCAN_MODE via table options to store().newScan(), but these options are only consumed by table-level scans (DataTableBatchScan), not by store-level scans (AbstractFileStoreScan). This means the scan always hit the latest snapshot instead of the specified one.
  • Fix by using the direct .withSnapshot(snapshot) API on FileStoreScan, consistent with getBucketsWithFlushedL0() in the same file.
  • Remove unused CoreOptions import.

Test Plan

  • Existing tests cover the affected code paths (DvTableReadableSnapshotRetrieverTest, FlinkUnionReadDvTableITCase)
  • The behavioral change is that the scan now correctly targets the specified snapshot instead of always scanning the latest one

🤖 Generated with Claude Code

…ue to ineffective options

getBucketsWithoutL0AndWithL0() passed SCAN_SNAPSHOT_ID and BATCH_SCAN_MODE
via table options to store().newScan(), but these options are only consumed
by table-level scans (DataTableBatchScan), not by store-level scans
(AbstractFileStoreScan). This means the scan always hit the latest snapshot
instead of the specified one.

Fix by using the direct .withSnapshot(snapshot) API on FileStoreScan,
consistent with getBucketsWithFlushedL0() in the same file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant