ASF GitHub Bot commented on FLINK-4512:
Github user StephanEwen commented on the issue:
+1 to the general approach and the code
Some suggestions for name polishing:
- How about renaming `DISCARD_ON_CANCELLATION` to
`DELETE_ON_CANCELLATION`? That would sound more explicit like "cleanup" and
actual file deletion.
- Since all checkpoints are persistent (at least in HA), how about
calling this `enableExternalizedCheckpoints()` rather than
- I would suggest to drop the method `enablePersistentCheckpoints()`
without a cleanup policy parameter. Whoever enables that feature should
explicitly think about what cleanup policy they want.
For the future, can we get rid of the extra storage location for the
externalized checkpoint metadata? Simply store it as well in the checkpoint
directory? That makes it simpler for users to track and clean up checkpoints
manually, if they want to retain externalized checkpoints across cancellations
and terminal failures.
- Both the config value and the location parameter to the
`enablePersistentCheckpoints()` would be dropped.
- That would imply that every state backend needs to be able to provide a
storage location for the checkpoint metadata
- The memory state backend would hence not work with externalized
checkpoints, unless one sets explicitly a parameter
Since this is a bigger change, I would suggest a followup pull request for
that. The only change I would make to this pull request (to make transition to
the followup smoother) is to remove the path parameter from the
`enablePersistentCheckpoints()` methods and always use the configuration value
(which will be replaced by the state backend's storage location).
> Add option for persistent checkpoints
> Key: FLINK-4512
> URL: https://issues.apache.org/jira/browse/FLINK-4512
> Project: Flink
> Issue Type: Sub-task
> Components: State Backends, Checkpointing
> Reporter: Ufuk Celebi
> Assignee: Ufuk Celebi
> Allow periodic checkpoints to be persisted by writing out their meta data.
> This is what we currently do for savepoints, but in the future checkpoints
> and savepoints are likely to diverge with respect to guarantees they give for
> updatability, etc.
> This means that the difference between persistent checkpoints and savepoints
> in the long term will be that persistent checkpoints can only be restored
> with the same job settings (like parallelism, etc.)
> Regular and persisted checkpoints should behave differently with respect to
> disposal in *globally* terminal job states (FINISHED, CANCELLED, FAILED):
> regular checkpoints are cleaned up in all of these cases whereas persistent
> checkpoints only on FINISHED. Maybe with the option to customize behaviour on
> CANCELLED or FAILED.
This message was sent by Atlassian JIRA