[flink] Add restore_as_latest procedure#8139
Conversation
ecd0935 to
0f821ed
Compare
0f821ed to
1492902
Compare
|
I think The new snapshot writes the target snapshot's files into the base manifest list, but writes an empty delta manifest list and marks the commit as Could |
|
@JingsongLi The new snapshot currently has the target snapshot's complete data manifests in baseManifestList, but its deltaManifestList is empty. This makes the final table state correct for batch/full scans, but the restore can be invisible to streaming overwrite readers. I will update restoreAsLatest to generate an overwrite delta relative to the previous latest snapshot: DELETE files that exist only in the previous latest snapshot, and ADD files that exist only in the target snapshot. The baseManifestList will contain the previous latest snapshot's merged effective ADD files, while deltaManifestList will describe the previous-latest-to-target transition. |
Ensure restore_as_latest writes an overwrite delta so streaming overwrite readers can observe restored file changes.
439db01 to
1c523ac
Compare
Purpose
This PR adds a non-destructive restore procedure for Flink:
Unlike
rollback_to, this procedure restores the table to the state of a target snapshot or tag by creating a new latest snapshot. Later snapshots and tags are preserved.What is changed
RestoreAsLatestProcedureand register it in the Flink procedure factory list.Tests
mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -DfailIfNoTests=false -Dtest=RestoreAsLatestProcedureITCase test git diff --checkNotes
This PR is not associated with an issue yet. If the community prefers following the discussion-first flow strictly, I can open or join an issue/discussion and adjust the design accordingly.