Reo-LEI commented on a change in pull request #3103:
URL: https://github.com/apache/iceberg/pull/3103#discussion_r716338791
##########
File path:
flink/src/main/java/org/apache/iceberg/flink/sink/IcebergFilesCommitter.java
##########
@@ -283,6 +287,7 @@ private void commitDeltaTxn(NavigableMap<Long, WriteResult>
pendingResults, Stri
// merged one will lead to the incorrect delete semantic.
WriteResult result = e.getValue();
RowDelta rowDelta = table.newRowDelta()
+ .validateFromSnapshot(lastCommittedSnapshotId)
Review comment:
As I listed in https://github.com/apache/iceberg/pull/2867, restart or
restore from checkpoint/savepoint, the `lastCommittedSnapshotId` will just
simply reset to null, and `rowDelta` will travel all snapshot history to ensure
data files still exist and guarantee all snapshot history are valid. If we
delete the expired snapshots by maintenance procedure before restoring the job,
the validation will travel to the snapshot which is commited by expire snapshot
maintenance procedure. I think that whould be ok.
This optimization just trying to speed up commit result in runtime, and I
want to keep it simple, so I think we don't need to save the
`lastCommittedSnapshotId` and restore it from checkpoint/savepoint. but I want
to hear @openinx @jackye1995 @stevenzwu @kbendick opinions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]