You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "afedulov (via GitHub)" <gi...@apache.org> on 2023/08/23 19:30:04 UTC

[GitHub] [flink-kubernetes-operator] afedulov commented on a diff in pull request #656: [FLINK-32904] Support cron expressions for periodic snapshots triggering

afedulov commented on code in PR #656:
URL: https://github.com/apache/flink-kubernetes-operator/pull/656#discussion_r1303456314


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/KubernetesOperatorConfigOptions.java:
##########
@@ -321,7 +336,32 @@ public static String operatorConfigKey(String key) {
                                     + "but to complement them in special cases. For instance, a "
                                     + "full checkpoint might need to be occasionally triggered to "
                                     + "break the chain of incremental checkpoints and consolidate "
-                                    + "the partial incremental files.");
+                                    + "the partial incremental files. "
+                                    + "WARNING: not intended to be used together with the cron-based "
+                                    + "periodic checkpoint triggering");
+
+    @Documentation.Section(SECTION_DYNAMIC)
+    public static final ConfigOption<String> PERIODIC_CHECKPOINT_CRON =
+            operatorConfig("periodic.checkpoint.cron")
+                    .stringType()
+                    .defaultValue(
+                            "0 0 0 29 2 ? 1999") // Default value that is guaranteed not to trigger (not a leap year)
+                    .withDescription(
+                            "A cron expression that defines when to automatically trigger checkpoints. "
+                                    + "The precise triggering schedule is not guaranteed, checkpoints will "
+                                    + "be triggered as part of the regular reconcile loop. Periodic triggering "
+                                    + "with frequency higher than the reconciliation loop "
+                                    + "("
+                                    + OPERATOR_RECONCILE_INTERVAL.key()
+                                    + ") will lead to trigger omissions. "
+                                    + "NOTE: checkpoints are generally managed by Flink. This "
+                                    + "setting isn't meant to replace Flink's checkpoint settings, "
+                                    + "but to complement them in special cases. For instance, a "
+                                    + "full checkpoint might need to be occasionally triggered to "
+                                    + "break the chain of incremental checkpoints and consolidate "
+                                    + "the partial incremental files. "
+                                    + "WARNING: not intended to be used together with the interval-based "
+                                    + "periodic checkpoint triggering");

Review Comment:
   @mxm yes, the warning just relates to the fact that such mixing makes triggering not predictable, because there is just one last checkpoint/savepoint timestamp field that is shared between the two.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org