mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-21 15:45:01 +00:00
app/vminsert/influx: properly handle the case when certain labels with empty values are removed by ApplyRelabeling() call
Previously this could lead to `out of range` panic
This commit is contained in:
parent
e4e1cd1de2
commit
8c14ca93fa
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ func insertRows(db string, rows []parser.Row) error {
|
||||||
}
|
}
|
||||||
labels := ic.Labels
|
labels := ic.Labels
|
||||||
if !hasRelabeling {
|
if !hasRelabeling {
|
||||||
labels = labels[labelsLen : labelsLen+1]
|
labels = labels[len(labels)-1:]
|
||||||
}
|
}
|
||||||
ic.WriteDataPoint(ctx.metricNameBuf, labels, r.Timestamp, f.Value)
|
ic.WriteDataPoint(ctx.metricNameBuf, labels, r.Timestamp, f.Value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue