mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/promql: intern output series names during normal aggregation
This commit is contained in:
parent
21ee9a1fab
commit
562d6bca08
1 changed files with 4 additions and 2 deletions
|
@ -7,6 +7,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
||||||
"github.com/VictoriaMetrics/metrics"
|
"github.com/VictoriaMetrics/metrics"
|
||||||
|
@ -118,13 +119,14 @@ func aggrFuncExt(afe func(tss []*timeseries, modifier *metricsql.ModifierExpr) [
|
||||||
if keepOriginal {
|
if keepOriginal {
|
||||||
ts = argOrig[i]
|
ts = argOrig[i]
|
||||||
}
|
}
|
||||||
tss := m[string(bb.B)]
|
k := bytesutil.InternBytes(bb.B)
|
||||||
|
tss := m[k]
|
||||||
if tss == nil && maxSeries > 0 && len(m) >= maxSeries {
|
if tss == nil && maxSeries > 0 && len(m) >= maxSeries {
|
||||||
// We already reached time series limit after grouping. Skip other time series.
|
// We already reached time series limit after grouping. Skip other time series.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
tss = append(tss, ts)
|
tss = append(tss, ts)
|
||||||
m[string(bb.B)] = tss
|
m[k] = tss
|
||||||
}
|
}
|
||||||
bbPool.Put(bb)
|
bbPool.Put(bb)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue