You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dennis-Mircea Ciupitu (Jira)" <ji...@apache.org> on 2026/06/15 12:30:00 UTC

[jira] [Commented] (FLINK-31867) Enforce a minimum number of observations within a metric window

    [ https://issues.apache.org/jira/browse/FLINK-31867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18089115#comment-18089115 ] 

Dennis-Mircea Ciupitu commented on FLINK-31867:
-----------------------------------------------

I think this is largely addressed now and could be closed.

- {{JobAutoScalerImpl}} enforces a minimum of two observations before evaluating: {{if (collectedMetrics.getMetricHistory().size() < 2) return;}} (added in FLINK-34266/FLINK-34213, after this ticket was filed).
- FLINK-39826 closed the related misconfiguration: {{DefaultValidator}} now rejects {{job.autoscaler.metrics.window < kubernetes.operator.reconcile.interval}}, since otherwise the window holds a single sample and the two-sample minimum is never reached.

This could still be relevant if the intent is to make the minimum configurable rather than always defaulting to 2. That said, the floor of 2 is what guarantees the correctness of the subsequent autoscaler calculations, so it shouldn't go below that. If users want more observations within a window, the right lever is already there: size the metric window relative to the reconcile interval so the window holds as many samples as they need. (cc [~gyfora])

> Enforce a minimum number of observations within a metric window
> ---------------------------------------------------------------
>
>                 Key: FLINK-31867
>                 URL: https://issues.apache.org/jira/browse/FLINK-31867
>             Project: Flink
>          Issue Type: Improvement
>          Components: Autoscaler, Kubernetes Operator
>            Reporter: Maximilian Michels
>            Priority: Major
>              Labels: pull-request-available, stale-assigned
>
> The metric window is currently only time-based. We should make sure we see a minimum number of observations to ensure we don't decide based on too few observations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)