pvary commented on issue #9089:
URL: https://github.com/apache/iceberg/issues/9089#issuecomment-1862676868

   The checkpointId is stored in the snapshot summary. It is written only once, 
and never modified. If you write a new checkpoint, it creates a new snapshot 
where the summary contains the new checkpointId. The old snapshot with the old 
checkpointId is still there but when looking for the last checkpointId we go 
through the history to find the actual one.
   
   The logic for finding the current checkpointId is:
   
   1. Check the current snapshot of the table
   2. If we find the JobId/OperatorId in the snapshot summary use the 
checkpointId from here
   3. If we do not find it then we look for the previous snapshot in the 
history and go to step 2
   4. If no history left, then we expect that this is the first checkpoint to 
this table.
   
   If someone removes snapshots, then Flink might find missing checkpoints and 
fail to restart. Finding newer snapshots than the current means that:
   - Either another Flink job has written to the table
   - This job was restarted from not the latest checkpoint/savepoint


-- 
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]

Reply via email to