mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect/netstorage: protect from too smart compiler, which may break memory usage optimization in ProcessSearchQuery
This commit is contained in:
parent
4c8b49b193
commit
461481fbdf
1 changed files with 2 additions and 3 deletions
|
@ -579,9 +579,8 @@ func ProcessSearchQuery(sq *storage.SearchQuery, fetchData bool, deadline Deadli
|
|||
} else {
|
||||
// An optimization for big number of time series with long metricName values:
|
||||
// use only a single copy of metricName for both orderedMetricNames and m.
|
||||
metricNameStr := string(metricName)
|
||||
orderedMetricNames = append(orderedMetricNames, metricNameStr)
|
||||
m[metricNameStr] = brs
|
||||
orderedMetricNames = append(orderedMetricNames, string(metricName))
|
||||
m[orderedMetricNames[len(orderedMetricNames)-1]] = brs
|
||||
}
|
||||
}
|
||||
if err := sr.Error(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue