mxm commented on code in PR #656:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/656#discussion_r1304303877
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/SnapshotUtils.java:
##########
@@ -259,6 +257,31 @@ protected static Optional<SnapshotTriggerType>
shouldTriggerSnapshot(
return Optional.empty();
}
+ private static boolean shouldTriggerAutomaticSnapshot(
+ SnapshotType snapshotType, String automaticTriggerExpression,
Instant lastTrigger) {
+ if (StringUtils.isBlank(automaticTriggerExpression)) {
+ return false;
+ }
+
+ boolean shouldTrigger =
+ shouldTriggerIntervalBasedSnapshot(
+ snapshotType, automaticTriggerExpression,
lastTrigger)
+ || shouldTriggerCronBasedSnapshot(
Review Comment:
This condition means that theoretically still both can trigger. We should
make sure that the condition guarantees mutual exclusion. So first check
interval, if false, only then check cron based execution.
--
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]