afedulov commented on code in PR #711:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/711#discussion_r1399219639
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/JobAutoScalerImpl.java:
##########
@@ -159,19 +161,24 @@ private void runScalingLogic(Context ctx,
AutoscalerFlinkMetrics autoscalerMetri
throws Exception {
var collectedMetrics = metricsCollector.updateMetrics(ctx, stateStore);
+ var jobTopology = collectedMetrics.getJobTopology();
if (collectedMetrics.getMetricHistory().isEmpty()) {
return;
}
LOG.debug("Collected metrics: {}", collectedMetrics);
- var evaluatedMetrics = evaluator.evaluate(ctx.getConfiguration(),
collectedMetrics);
+ var now = clock.instant();
+ // Scaling tracking data contains previous restart times that are
taken into account
+ var scalingTracking = getTrimmedScalingTracking(stateStore, ctx, now);
+ var evaluatedMetrics =
+ evaluator.evaluate(ctx.getConfiguration(), collectedMetrics,
scalingTracking);
Review Comment:
The way the scalingHistory is currently structured, this would currently
lead to duplicating the restart time unnecessarily per job vertex.
--
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]