gyfora commented on code in PR #850:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/850#discussion_r1667639016


##########
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:
   Good point adding this to the docs



-- 
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]

Reply via email to