mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
reduce unnecessary vmstorage query (#3031)
* reduce unnecessary vmstorage query * reduce unnecessary vmstorage query * rollback limit logic /api/v1/label/*
This commit is contained in:
parent
5d4b1bc742
commit
6d81584d2a
1 changed files with 6 additions and 1 deletions
|
@ -616,7 +616,12 @@ func SeriesHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseW
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sq := storage.NewSearchQuery(cp.start, cp.end, cp.filterss, *maxSeriesLimit)
|
||||
|
||||
minLimit := *maxSeriesLimit
|
||||
if limit > 0 && limit < *maxSeriesLimit {
|
||||
minLimit = limit
|
||||
}
|
||||
sq := storage.NewSearchQuery(cp.start, cp.end, cp.filterss, minLimit)
|
||||
metricNames, err := netstorage.SearchMetricNames(qt, sq, cp.deadline)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot fetch time series for %q: %w", sq, err)
|
||||
|
|
Loading…
Reference in a new issue