mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00: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
2 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ func BenchmarkHeadPostingForMatchers(b *testing.B) {
|
|||
b.Run(`i=~".*"`, func(b *testing.B) {
|
||||
tfs := NewTagFilters(accountID, projectID)
|
||||
addTagFilter(tfs, "i", ".*", false, true)
|
||||
benchSearch(b, tfs, 5e6)
|
||||
benchSearch(b, tfs, 0)
|
||||
})
|
||||
b.Run(`i=~".+"`, func(b *testing.B) {
|
||||
tfs := NewTagFilters(accountID, projectID)
|
||||
|
|
|
@ -168,7 +168,7 @@ func (tfs *TagFilters) Add(key, value []byte, isNegative, isRegexp bool) error {
|
|||
}
|
||||
if isRegexp && string(value) == ".*" {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue