mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
s/IsEmptyPostings/IsEmptyPostingsType/
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
parent
f3d001df2e
commit
e246ce436d
|
@ -113,7 +113,7 @@ func (h *headIndexReader) Postings(name string, values ...string) (index.Posting
|
|||
default:
|
||||
res := make([]index.Postings, 0, len(values))
|
||||
for _, value := range values {
|
||||
if p := h.head.postings.Get(name, value); !index.IsEmptyPostings(p) {
|
||||
if p := h.head.postings.Get(name, value); !index.IsEmptyPostingsType(p) {
|
||||
res = append(res, p)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -428,10 +428,10 @@ func EmptyPostings() Postings {
|
|||
return emptyPostings
|
||||
}
|
||||
|
||||
// IsEmptyPostings returns true if the postings are an empty postings list.
|
||||
// IsEmptyPostingsType returns true if the postings are an empty postings list.
|
||||
// When this function returns false, it doesn't mean that the postings isn't empty
|
||||
// (it could be an empty intersection of two non-empty postings, for example).
|
||||
func IsEmptyPostings(p Postings) bool {
|
||||
func IsEmptyPostingsType(p Postings) bool {
|
||||
return p == emptyPostings
|
||||
}
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ func PostingsForMatchers(ix IndexPostingsReader, ms ...*labels.Matcher) (index.P
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if index.IsEmptyPostings(it) {
|
||||
if index.IsEmptyPostingsType(it) {
|
||||
return index.EmptyPostings(), nil
|
||||
}
|
||||
its = append(its, it)
|
||||
|
@ -225,7 +225,7 @@ func PostingsForMatchers(ix IndexPostingsReader, ms ...*labels.Matcher) (index.P
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if index.IsEmptyPostings(it) {
|
||||
if index.IsEmptyPostingsType(it) {
|
||||
return index.EmptyPostings(), nil
|
||||
}
|
||||
its = append(its, it)
|
||||
|
|
Loading…
Reference in a new issue