mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-21 15:45:01 +00:00
lib/storage: tune the returned value from adjustMaxMetricsAdaptive
This commit is contained in:
parent
6be4456d88
commit
02e0b19a62
1 changed files with 3 additions and 3 deletions
|
@ -1299,10 +1299,10 @@ func (is *indexSearch) adjustMaxMetricsAdaptive(tr TimeRange, maxMetrics int) in
|
||||||
return maxMetrics
|
return maxMetrics
|
||||||
}
|
}
|
||||||
hourMetrics := hmPrev.m.Len()
|
hourMetrics := hmPrev.m.Len()
|
||||||
if hourMetrics >= 256 && maxMetrics > hourMetrics/4 {
|
if maxMetrics > hourMetrics {
|
||||||
// It is cheaper to filter on the hour or day metrics if the minimum
|
// It is cheaper to filter on the hour or day metrics if the minimum
|
||||||
// number of matching metrics across tfs exceeds hourMetrics / 4.
|
// number of matching metrics across tfs exceeds hourMetrics.
|
||||||
return hourMetrics / 4
|
return hourMetrics
|
||||||
}
|
}
|
||||||
return maxMetrics
|
return maxMetrics
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue