[lake/iceberg] Support snapshot expiration for lake tables#2881
Open
vamossagar12 wants to merge 3 commits intoapache:mainfrom
Open
[lake/iceberg] Support snapshot expiration for lake tables#2881vamossagar12 wants to merge 3 commits intoapache:mainfrom
vamossagar12 wants to merge 3 commits intoapache:mainfrom
Conversation
Contributor
Author
|
@luoyuxia please review this PR. Thanks! |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Iceberg support for automatic snapshot expiration in Fluss lake tiering commits, controlled by existing table/tiering configs (mirroring prior Paimon behavior) and validated via new Iceberg tiering tests.
Changes:
- Trigger Iceberg snapshot expiration after successful tiering commits when either
table.datalake.auto-expire-snapshotorlake.tiering.auto-expire-snapshotis enabled. - Pass full
CommitterInitContextintoIcebergLakeCommitterso it can read table/tiering configs. - Add a parameterized Iceberg tiering test to verify snapshot retention/expiration behavior under different config combinations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeTieringFactory.java | Wires CommitterInitContext into the committer so commit-time behavior can depend on configs. |
| fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/tiering/IcebergLakeCommitter.java | Implements optional snapshot expiration after commits based on table/tiering configuration. |
| fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/tiering/IcebergTieringTest.java | Adds parameterized coverage for snapshot expiration and enables passing tiering config into the committer in tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...uss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/tiering/IcebergTieringTest.java
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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 #2213
Brief change log
Similar to #2182, this PR adds support for snapshot expiration for Iceberg tables.
Tests
fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/tiering/IcebergTieringTest.java
API and Format
N/A
Documentation
No. The configs
table.datalake.auto-expire-snapshotandtiering service config lake.tiering.auto-expire-snapshotalready exist. This PR makes Iceberg implement it.