mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
TSDB: Lock round access to labels, where necessary
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
26b3de0438
commit
e95607b276
|
@ -347,7 +347,7 @@ func (ir *OOOCompactionHeadIndexReader) Series(ref storage.SeriesRef, builder *l
|
||||||
ir.ch.head.metrics.seriesNotFound.Inc()
|
ir.ch.head.metrics.seriesNotFound.Inc()
|
||||||
return storage.ErrNotFound
|
return storage.ErrNotFound
|
||||||
}
|
}
|
||||||
builder.Assign(s.lset)
|
builder.Assign(s.labels())
|
||||||
|
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
@ -494,7 +494,7 @@ func (oh *HeadAndOOOIndexReader) Series(ref storage.SeriesRef, builder *labels.S
|
||||||
oh.head.metrics.seriesNotFound.Inc()
|
oh.head.metrics.seriesNotFound.Inc()
|
||||||
return storage.ErrNotFound
|
return storage.ErrNotFound
|
||||||
}
|
}
|
||||||
builder.Assign(s.lset)
|
builder.Assign(s.labels())
|
||||||
|
|
||||||
if chks == nil {
|
if chks == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue