mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: small code simplification after 6cee5338b2
This commit is contained in:
parent
4443254fb9
commit
7503111feb
1 changed files with 1 additions and 2 deletions
|
@ -16,7 +16,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil"
|
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"
|
||||||
|
@ -1129,7 +1128,7 @@ func (s *Storage) SearchGraphitePaths(accountID, projectID uint32, tr TimeRange,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Storage) searchGraphitePaths(accountID, projectID uint32, tr TimeRange, qHead, qTail []byte, maxPaths int, deadline uint64) ([]string, error) {
|
func (s *Storage) searchGraphitePaths(accountID, projectID uint32, tr TimeRange, qHead, qTail []byte, maxPaths int, deadline uint64) ([]string, error) {
|
||||||
n := strings.IndexAny(bytesutil.ToUnsafeString(qTail), "*[{")
|
n := bytes.IndexAny(qTail, "*[{")
|
||||||
if n < 0 {
|
if n < 0 {
|
||||||
// Verify that qHead matches a metric name.
|
// Verify that qHead matches a metric name.
|
||||||
qHead = append(qHead, qTail...)
|
qHead = append(qHead, qTail...)
|
||||||
|
|
Loading…
Reference in a new issue