mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 14:27:27 -08:00
Merge pull request #14279 from colega/fix-label-names-for-not-found
headIndexReader.LabelNamesFor: skip not found series
This commit is contained in:
commit
c5d923aa7c
|
@ -277,7 +277,9 @@ func (h *headIndexReader) LabelNamesFor(ctx context.Context, ids ...storage.Seri
|
||||||
}
|
}
|
||||||
memSeries := h.head.series.getByID(chunks.HeadSeriesRef(id))
|
memSeries := h.head.series.getByID(chunks.HeadSeriesRef(id))
|
||||||
if memSeries == nil {
|
if memSeries == nil {
|
||||||
return nil, storage.ErrNotFound
|
// Series not found, this happens during compaction,
|
||||||
|
// when series was garbage collected after the caller got the series IDs.
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
memSeries.lset.Range(func(lbl labels.Label) {
|
memSeries.lset.Range(func(lbl labels.Label) {
|
||||||
namesMap[lbl.Name] = struct{}{}
|
namesMap[lbl.Name] = struct{}{}
|
||||||
|
|
Loading…
Reference in a new issue