diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d1aa1345de..a9f079f869 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,8 @@ # 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) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 477c87a34c..35bbdb5a18 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -1095,12 +1095,12 @@ func (s *Storage) SearchGraphitePaths(accountID, projectID uint32, tr TimeRange, return nil, fmt.Errorf("more than maxPaths=%d suffixes found", maxPaths) } qPrefixStr := queryStr[:n] - qNode := queryStr[n:] qTail := "" + qNode := queryStr[n:] mustMatchLeafs := true if m := strings.IndexByte(qNode, '.'); m >= 0 { - qNode = qNode[:m+1] qTail = qNode[m+1:] + qNode = qNode[:m+1] mustMatchLeafs = false } re, err := getRegexpForGraphiteNodeQuery(qNode)