app/vmselect/promql: reduce the maximum number of label values, which can be propagated from one side of the binary operation to another side of the binary operation from 10K to 1K

There are user reports that 10K unique values in a single label filter may lead to performance and memory usage issues
This commit is contained in:
Aliaksandr Valialkin 2022-02-24 04:03:25 +02:00
parent 3f49bdaeff
commit 0d47c23a03
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -382,7 +382,7 @@ func getCommonLabelFilters(tss []*timeseries) []metricsql.LabelFilter {
continue
}
values = getUniqueValues(values)
if len(values) > 10000 {
if len(values) > 1000 {
// Skip the filter on the given tag, since it needs to enumerate too many unique values.
// This may slow down the search for matching time series.
continue