-
Notifications
You must be signed in to change notification settings - Fork 180
Select series with label unset for != and !~ #228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks great. Did you run any manual benchmarks? Would it make sense to add one to our test files since pulling in allPostings
may have performance implications?
@@ -289,7 +289,7 @@ func (pb *Block) Delete(mint, maxt int64, ms ...labels.Matcher) error { | |||
return ErrClosing | |||
} | |||
|
|||
p, absent, err := PostingsForMatchers(pb.indexr, ms...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
db_test.go
Outdated
testutil.Ok(t, err) | ||
defer db.Close() | ||
|
||
lbls := labels.Labels{labels.Label{Name: "labelname", Value: "labelvalue"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
labels.FromStrings("labelname", "labelvalue")
– those helpers were mostly added for tests.
db_test.go
Outdated
defer q.Close() | ||
|
||
ss, err := q.Select(labels.Not(labels.NewEqualMatcher("lname", "lvalue"))) | ||
testutil.Ok(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably cheap and easy to add a few other checks here as well.
Fixes prometheus/prometheus#3575 Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
33fd60c
to
3158b03
Compare
Fixed all comments but did not run any benchmarks. Will do them later, sorry. |
Fixes prometheus/prometheus#3575
Signed-off-by: Goutham Veeramachaneni cs14btech11014@iith.ac.in
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)