mateczagany commented on code in PR #850:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/850#discussion_r1666395622
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/ClusterHealthEvaluator.java:
##########
@@ -178,30 +178,46 @@ private boolean evaluateCheckpoints(
return true;
}
- var completedCheckpointsCheckWindow =
-
configuration.get(OPERATOR_CLUSTER_HEALTH_CHECK_CHECKPOINT_PROGRESS_WINDOW);
+ var windowOpt =
+
configuration.getOptional(OPERATOR_CLUSTER_HEALTH_CHECK_CHECKPOINT_PROGRESS_WINDOW);
CheckpointConfig checkpointConfig = new CheckpointConfig();
checkpointConfig.configure(configuration);
var checkpointingInterval = checkpointConfig.getCheckpointInterval();
var checkpointingTimeout = checkpointConfig.getCheckpointTimeout();
- var tolerationFailureNumber =
checkpointConfig.getTolerableCheckpointFailureNumber() + 1;
- var minCompletedCheckpointsCheckWindow =
- Math.max(
- checkpointingInterval * tolerationFailureNumber,
- checkpointingTimeout * tolerationFailureNumber);
- if (completedCheckpointsCheckWindow.toMillis() <
minCompletedCheckpointsCheckWindow) {
- LOG.warn(
- "{} is not long enough. Default to max({} * {}, {} * {}):
{}ms",
-
OPERATOR_CLUSTER_HEALTH_CHECK_CHECKPOINT_PROGRESS_WINDOW.key(),
- CHECKPOINTING_INTERVAL.key(),
- TOLERABLE_FAILURE_NUMBER.key(),
- CHECKPOINTING_TIMEOUT.key(),
- TOLERABLE_FAILURE_NUMBER.key(),
- minCompletedCheckpointsCheckWindow);
- completedCheckpointsCheckWindow =
Duration.ofMillis(minCompletedCheckpointsCheckWindow);
+ var tolerationFailureNumber =
checkpointConfig.getTolerableCheckpointFailureNumber() + 2;
Review Comment:
Neither the docs nor the debug message mention adding 2 to the tolerable
failures. I guess it makes sense given that this can be 0, but I think it's
still worth a mention in the docs and possibly the debug message below to avoid
confusion.
--
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]