Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2608 +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 `enablePersistentCheckpoints()`? - 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 `setExternalizedCheckpointsLocation(uri)`.` 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).
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---