mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/promscrape: zero out labels after duplicate removal inside mergeLabels()
This commit is contained in:
parent
e9f08b1e6a
commit
1ae16bf671
@ -1054,7 +1054,7 @@ func getLabelsContext() *labelsContext {
|
||||
}
|
||||
|
||||
func putLabelsContext(lctx *labelsContext) {
|
||||
labels := lctx.labels[:cap(lctx.labels)]
|
||||
labels := lctx.labels
|
||||
for i := range labels {
|
||||
labels[i].Name = ""
|
||||
labels[i].Value = ""
|
||||
@ -1317,6 +1317,12 @@ func mergeLabels(dst []prompbmarshal.Label, swc *scrapeWorkConfig, target string
|
||||
prevName = label.Name
|
||||
}
|
||||
}
|
||||
tail := dst[len(tmp):]
|
||||
for i := range tail {
|
||||
label := &tail[i]
|
||||
label.Name = ""
|
||||
label.Value = ""
|
||||
}
|
||||
return tmp
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user