mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
Check error before wrapping
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
This commit is contained in:
parent
ee010e9fab
commit
0dcaf10564
12
block.go
12
block.go
|
@ -453,7 +453,10 @@ func (r blockIndexReader) LabelValues(names ...string) (index.StringTuples, erro
|
||||||
|
|
||||||
func (r blockIndexReader) Postings(name, value string) (index.Postings, error) {
|
func (r blockIndexReader) Postings(name, value string) (index.Postings, error) {
|
||||||
p, err := r.ir.Postings(name, value)
|
p, err := r.ir.Postings(name, value)
|
||||||
|
if err != nil {
|
||||||
return p, errors.Wrapf(err, "block: %s", r.b.Meta().ULID)
|
return p, errors.Wrapf(err, "block: %s", r.b.Meta().ULID)
|
||||||
|
}
|
||||||
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r blockIndexReader) SortedPostings(p index.Postings) index.Postings {
|
func (r blockIndexReader) SortedPostings(p index.Postings) index.Postings {
|
||||||
|
@ -461,11 +464,10 @@ func (r blockIndexReader) SortedPostings(p index.Postings) index.Postings {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r blockIndexReader) Series(ref uint64, lset *labels.Labels, chks *[]chunks.Meta) error {
|
func (r blockIndexReader) Series(ref uint64, lset *labels.Labels, chks *[]chunks.Meta) error {
|
||||||
return errors.Wrapf(
|
if err := r.ir.Series(ref, lset, chks); err != nil {
|
||||||
r.ir.Series(ref, lset, chks),
|
return errors.Wrapf(err, "block: %s", r.b.Meta().ULID)
|
||||||
"block: %s",
|
}
|
||||||
r.b.Meta().ULID,
|
return nil
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r blockIndexReader) LabelIndices() ([][]string, error) {
|
func (r blockIndexReader) LabelIndices() ([][]string, error) {
|
||||||
|
|
Loading…
Reference in a new issue