mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
app/vmselect/promql: do not use unsafe conversion from bytes slice to string when storing a value by map key
The assigned map key shouldn't change over time, otherwise the map won't work properly.
This is a follow-up for 1f91f22b5f
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5087
This commit is contained in:
parent
2c334ed953
commit
97a7128e4b
1 changed files with 1 additions and 1 deletions
|
@ -420,7 +420,7 @@ func transformBucketsLimit(tfa *transformFuncArg) ([]*timeseries, error) {
|
||||||
mn.CopyFrom(&ts.MetricName)
|
mn.CopyFrom(&ts.MetricName)
|
||||||
mn.RemoveTag("le")
|
mn.RemoveTag("le")
|
||||||
b = marshalMetricNameSorted(b[:0], &mn)
|
b = marshalMetricNameSorted(b[:0], &mn)
|
||||||
k := bytesutil.ToUnsafeString(b)
|
k := string(b)
|
||||||
m[k] = append(m[k], x{
|
m[k] = append(m[k], x{
|
||||||
le: le,
|
le: le,
|
||||||
ts: ts,
|
ts: ts,
|
||||||
|
|
Loading…
Reference in a new issue