[lake/paimon] Skip readable snapshot recomputation when latest compacted snapshot already in ZK#2640
Merged
wuchong merged 1 commit intoapache:mainfrom Feb 12, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce redundant work in the Paimon DV readable-snapshot resolution by skipping recomputation when the latest compacted snapshot is already registered in Fluss (ZK), and adds a unit test to cover the new behavior.
Changes:
- Add a Fluss (ZK) lookup for the latest compacted snapshot and early-return when it is already present.
- Update method JavaDoc to document the new short-circuit behavior.
- Extend the existing readable-snapshot retriever test to assert the “skip recomputation” case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/DvTableReadableSnapshotRetriever.java |
Adds ZK/Fluss snapshot existence check and returns null to skip recomputation when present. |
fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/utils/DvTableReadableSnapshotRetrieverTest.java |
Adds a test scenario expecting null when the latest compacted snapshot is already registered. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...aimon/src/main/java/org/apache/fluss/lake/paimon/utils/DvTableReadableSnapshotRetriever.java
Show resolved
Hide resolved
...aimon/src/main/java/org/apache/fluss/lake/paimon/utils/DvTableReadableSnapshotRetriever.java
Show resolved
Hide resolved
...n/src/test/java/org/apache/fluss/lake/paimon/utils/DvTableReadableSnapshotRetrieverTest.java
Show resolved
Hide resolved
…ted snapshot already in ZK
b440cbe to
0a9468e
Compare
Contributor
Author
|
@wuchong I submit a pr to skip readable snapshot recomputation when the latest compacted snapshot is already registered in Fluss (ZK) for paimon deletion vector table. Could you please help review? |
wuchong
approved these changes
Feb 12, 2026
wuchong
pushed a commit
that referenced
this pull request
Feb 12, 2026
…ted snapshot already in ZK (#2640)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #2626
Optimize readable snapshot computation performance: skip redundant tiered and readable offset recalculation when the latest compacted snapshot is already registered in Fluss (ZK). This avoids expensive recomputation when multiple APPEND snapshots follow a single COMPACT snapshot.
Brief change log
Tests
N/A
API and Format
N/A
Documentation
N/A