mirror of https://github.com/prometheus/prometheus
Code Review: Extend lock.
parent
2526ab8c81
commit
285a8b701b
|
@ -234,8 +234,8 @@ func (s *memorySeriesStorage) GetFingerprintsForLabelSet(l model.LabelSet) (fing
|
||||||
|
|
||||||
func (s *memorySeriesStorage) GetFingerprintsForLabelName(l model.LabelName) (model.Fingerprints, error) {
|
func (s *memorySeriesStorage) GetFingerprintsForLabelName(l model.LabelName) (model.Fingerprints, error) {
|
||||||
s.RLock()
|
s.RLock()
|
||||||
|
defer s.RUnlock()
|
||||||
values, ok := s.labelNameToFingerprints[l]
|
values, ok := s.labelNameToFingerprints[l]
|
||||||
s.RUnlock()
|
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue