mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: respect the deadline passed to Storage.SearchMetricNames
This commit is contained in:
parent
40e47935e7
commit
12ca0efc19
1 changed files with 5 additions and 0 deletions
|
@ -938,6 +938,11 @@ func (s *Storage) SearchMetricNames(tfss []*TagFilters, tr TimeRange, maxMetrics
|
||||||
mns := make([]MetricName, 0, len(tsids))
|
mns := make([]MetricName, 0, len(tsids))
|
||||||
var metricName []byte
|
var metricName []byte
|
||||||
for i := range tsids {
|
for i := range tsids {
|
||||||
|
if i&paceLimiterSlowIterationsMask == 0 {
|
||||||
|
if err := checkSearchDeadlineAndPace(deadline); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
metricID := tsids[i].MetricID
|
metricID := tsids[i].MetricID
|
||||||
var err error
|
var err error
|
||||||
metricName, err = idb.searchMetricNameWithCache(metricName[:0], metricID, accountID, projectID)
|
metricName, err = idb.searchMetricNameWithCache(metricName[:0], metricID, accountID, projectID)
|
||||||
|
|
Loading…
Reference in a new issue