mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +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
6f92fb8783
commit
80067fd03a
1 changed files with 6 additions and 1 deletions
|
@ -680,7 +680,12 @@ func SeriesHandler(qt *querytracer.Tracer, startTime time.Time, at *auth.Token,
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sq := storage.NewSearchQuery(at.AccountID, at.ProjectID, cp.start, cp.end, cp.filterss, *maxSeriesLimit)
|
||||
|
||||
minLimit := *maxSeriesLimit
|
||||
if limit > 0 && limit < *maxSeriesLimit {
|
||||
minLimit = limit
|
||||
}
|
||||
sq := storage.NewSearchQuery(at.AccountID, at.ProjectID, cp.start, cp.end, cp.filterss, minLimit)
|
||||
denyPartialResponse := searchutils.GetDenyPartialResponse(r)
|
||||
metricNames, isPartial, err := netstorage.SearchMetricNames(qt, denyPartialResponse, sq, cp.deadline)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue