diff --git a/tsdb/head_append.go b/tsdb/head_append.go index 149cd4666..7160711e5 100644 --- a/tsdb/head_append.go +++ b/tsdb/head_append.go @@ -243,6 +243,9 @@ func (h *Head) putExemplarBuffer(b []exemplarWithSeriesRef) { if b == nil { return } + for i := range b { // Zero out to avoid retaining label data + b[i].exemplar.Labels = labels.EmptyLabels() + } h.exemplarsPool.Put(b[:0]) } @@ -292,6 +295,9 @@ func (h *Head) getSeriesBuffer() []*memSeries { } func (h *Head) putSeriesBuffer(b []*memSeries) { + for i := range b { // Zero out to avoid retaining data + b[i] = nil + } h.seriesPool.Put(b[:0]) }