mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
lib/storage: fix broken BenchmarkHeadPostingForMatchers for {i=~".*"}
after f4dead529f
The commit f4dead529f
makes such query to return nothing instead of all the time series.
This aligns more with Prometheus behaviour.
This commit is contained in:
parent
791cad8c2e
commit
21a42e990f
@ -206,7 +206,7 @@ func BenchmarkHeadPostingForMatchers(b *testing.B) {
|
|||||||
b.Run(`i=~".*"`, func(b *testing.B) {
|
b.Run(`i=~".*"`, func(b *testing.B) {
|
||||||
tfs := NewTagFilters(accountID, projectID)
|
tfs := NewTagFilters(accountID, projectID)
|
||||||
addTagFilter(tfs, "i", ".*", false, true)
|
addTagFilter(tfs, "i", ".*", false, true)
|
||||||
benchSearch(b, tfs, 5e6)
|
benchSearch(b, tfs, 0)
|
||||||
})
|
})
|
||||||
b.Run(`i=~".+"`, func(b *testing.B) {
|
b.Run(`i=~".+"`, func(b *testing.B) {
|
||||||
tfs := NewTagFilters(accountID, projectID)
|
tfs := NewTagFilters(accountID, projectID)
|
||||||
|
@ -168,7 +168,7 @@ func (tfs *TagFilters) Add(key, value []byte, isNegative, isRegexp bool) error {
|
|||||||
}
|
}
|
||||||
if isRegexp && string(value) == ".*" {
|
if isRegexp && string(value) == ".*" {
|
||||||
if !isNegative {
|
if !isNegative {
|
||||||
// Skip tag filter matching anything, since it equal to no filter.
|
// Skip tag filter matching anything, since it equals to no filter.
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user