mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
lib/storage: fix a bug, which breaks searching by Graphite wildcard filters
This commit is contained in:
parent
45a63a1da9
commit
2976ec89b8
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
# tip
|
# tip
|
||||||
|
|
||||||
|
* BUGFIX: vmselect: fix the bug peventing from proper searching by Graphite filter with wildcards such as `{__graphite__="foo.*.bar"}`.
|
||||||
|
|
||||||
|
|
||||||
# [v1.53.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.53.0)
|
# [v1.53.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.53.0)
|
||||||
|
|
||||||
|
@ -1095,12 +1095,12 @@ func (s *Storage) SearchGraphitePaths(accountID, projectID uint32, tr TimeRange,
|
|||||||
return nil, fmt.Errorf("more than maxPaths=%d suffixes found", maxPaths)
|
return nil, fmt.Errorf("more than maxPaths=%d suffixes found", maxPaths)
|
||||||
}
|
}
|
||||||
qPrefixStr := queryStr[:n]
|
qPrefixStr := queryStr[:n]
|
||||||
qNode := queryStr[n:]
|
|
||||||
qTail := ""
|
qTail := ""
|
||||||
|
qNode := queryStr[n:]
|
||||||
mustMatchLeafs := true
|
mustMatchLeafs := true
|
||||||
if m := strings.IndexByte(qNode, '.'); m >= 0 {
|
if m := strings.IndexByte(qNode, '.'); m >= 0 {
|
||||||
qNode = qNode[:m+1]
|
|
||||||
qTail = qNode[m+1:]
|
qTail = qNode[m+1:]
|
||||||
|
qNode = qNode[:m+1]
|
||||||
mustMatchLeafs = false
|
mustMatchLeafs = false
|
||||||
}
|
}
|
||||||
re, err := getRegexpForGraphiteNodeQuery(qNode)
|
re, err := getRegexpForGraphiteNodeQuery(qNode)
|
||||||
|
Loading…
Reference in New Issue
Block a user