Closed staebler closed 4 years ago
@MikeSpreitzer Would it be appropriate to do a similar fix to what was was done in https://github.com/kubernetes/apiserver/commit/b1ede52e216baf0bf245cba1107442e5b102b694 for the histograms in the max-in-flight filter?
Sorry, I realize now that this issue should have been submitted to https://github.com/kubernetes/kubernetes. I created https://github.com/kubernetes/kubernetes/issues/95300.
When it has been a long time (ie, hours) since an apiserver has received any mutating requests, then the next mutating request can take too long to perform observations on mutating requests in the max-in-flight filter.
The following code has to loop over many, many elements. https://github.com/kubernetes/apiserver/blob/v0.19.0/pkg/util/flowcontrol/metrics/sample_and_watermark.go#L185-L191