mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +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
e3adcbec6e
commit
08428464e9
2 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ func BenchmarkHeadPostingForMatchers(b *testing.B) {
|
|||
b.Run(`i=~".*"`, func(b *testing.B) {
|
||||
tfs := NewTagFilters()
|
||||
addTagFilter(tfs, "i", ".*", false, true)
|
||||
benchSearch(b, tfs, 5e6)
|
||||
benchSearch(b, tfs, 0)
|
||||
})
|
||||
b.Run(`i=~".+"`, func(b *testing.B) {
|
||||
tfs := NewTagFilters()
|
||||
|
|
|
@ -162,7 +162,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