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
8e2afdf568
commit
3cfb3a3683
1 changed files with 5 additions and 0 deletions
|
@ -870,6 +870,11 @@ func (s *Storage) SearchMetricNames(tfss []*TagFilters, tr TimeRange, maxMetrics
|
|||
mns := make([]MetricName, 0, len(tsids))
|
||||
var metricName []byte
|
||||
for i := range tsids {
|
||||
if i&paceLimiterSlowIterationsMask == 0 {
|
||||
if err := checkSearchDeadlineAndPace(deadline); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
metricID := tsids[i].MetricID
|
||||
var err error
|
||||
metricName, err = idb.searchMetricNameWithCache(metricName[:0], metricID)
|
||||
|
|
Loading…
Reference in a new issue