gyfora commented on code in PR #728:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/728#discussion_r1431635885
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/ScalingMetricCollector.java:
##########
@@ -147,7 +149,13 @@ public CollectedMetricHistory updateMetrics(
if (now.isBefore(windowFullTime)) {
LOG.info("Metric window not full until {}",
readable(windowFullTime));
} else {
- collectedMetrics.setFullyCollected(true);
+ if (isExcluded) {
+ LOG.info(
+ "Autoscaling on halt based on exclusion rule {}",
+ conf.get(AutoScalerOptions.EXCLUDED_PERIODS));
+ } else {
+ collectedMetrics.setFullyCollected(true);
+ }
Review Comment:
Enforcing this through collectedMetrics.setFullyCollected(true); seems a bit
hacky and susceptible to breaking if we treat the collected metrics differently.
Maybe we should move this check to the `ScalingExecutor`
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/ScalingMetricCollector.java:
##########
@@ -147,7 +149,13 @@ public CollectedMetricHistory updateMetrics(
if (now.isBefore(windowFullTime)) {
LOG.info("Metric window not full until {}",
readable(windowFullTime));
} else {
- collectedMetrics.setFullyCollected(true);
+ if (isExcluded) {
+ LOG.info(
+ "Autoscaling on halt based on exclusion rule {}",
+ conf.get(AutoScalerOptions.EXCLUDED_PERIODS));
+ } else {
+ collectedMetrics.setFullyCollected(true);
+ }
Review Comment:
what do you think @mxm ?
--
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]