mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #528 from grafana/check-not-found-err-in-label-values-from-series
Check storage.ErrNotFound in labelValuesFromSeries
This commit is contained in:
commit
7c067467a0
|
@ -434,6 +434,10 @@ func labelValuesFromSeries(r IndexReader, labelName string, refs []storage.Serie
|
|||
var builder labels.ScratchBuilder
|
||||
for _, ref := range refs {
|
||||
err := r.Series(ref, &builder, nil)
|
||||
// Postings may be stale. Skip if no underlying series exists.
|
||||
if errors.Cause(err) == storage.ErrNotFound {
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "label values for label %s", labelName)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue