mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/storage: respect the deadline passed to Storage.SearchMetricNames
This commit is contained in:
parent
40e47935e7
commit
12ca0efc19
@ -938,6 +938,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, accountID, projectID)
|
||||
|
Loading…
Reference in New Issue
Block a user