mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +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 {
|
} else {
|
||||||
// An optimization for big number of time series with long metricName values:
|
// An optimization for big number of time series with long metricName values:
|
||||||
// use only a single copy of metricName for both orderedMetricNames and m.
|
// use only a single copy of metricName for both orderedMetricNames and m.
|
||||||
metricNameStr := string(metricName)
|
orderedMetricNames = append(orderedMetricNames, string(metricName))
|
||||||
orderedMetricNames = append(orderedMetricNames, metricNameStr)
|
m[orderedMetricNames[len(orderedMetricNames)-1]] = brs
|
||||||
m[metricNameStr] = brs
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := sr.Error(); err != nil {
|
if err := sr.Error(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue