vendor: update github.com/VictoriaMetrics/metricsql from v0.44.0 to v0.44.1

This commit is contained in:
Aliaksandr Valialkin 2022-06-30 17:37:12 +03:00
parent 0a8e35835c
commit 32ac6b5ed8
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
4 changed files with 7 additions and 14 deletions

2
go.mod
View file

@ -10,7 +10,7 @@ require (
// like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b // like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b
github.com/VictoriaMetrics/fasthttp v1.1.0 github.com/VictoriaMetrics/fasthttp v1.1.0
github.com/VictoriaMetrics/metrics v1.18.1 github.com/VictoriaMetrics/metrics v1.18.1
github.com/VictoriaMetrics/metricsql v0.44.0 github.com/VictoriaMetrics/metricsql v0.44.1
github.com/aws/aws-sdk-go v1.44.43 github.com/aws/aws-sdk-go v1.44.43
github.com/cespare/xxhash/v2 v2.1.2 github.com/cespare/xxhash/v2 v2.1.2

4
go.sum
View file

@ -108,8 +108,8 @@ github.com/VictoriaMetrics/fasthttp v1.1.0 h1:3crd4YWHsMwu60GUXRH6OstowiFvqrwS4a
github.com/VictoriaMetrics/fasthttp v1.1.0/go.mod h1:/7DMcogqd+aaD3G3Hg5kFgoFwlR2uydjiWvoLp5ZTqQ= github.com/VictoriaMetrics/fasthttp v1.1.0/go.mod h1:/7DMcogqd+aaD3G3Hg5kFgoFwlR2uydjiWvoLp5ZTqQ=
github.com/VictoriaMetrics/metrics v1.18.1 h1:OZ0+kTTto8oPfHnVAnTOoyl0XlRhRkoQrD2n2cOuRw0= github.com/VictoriaMetrics/metrics v1.18.1 h1:OZ0+kTTto8oPfHnVAnTOoyl0XlRhRkoQrD2n2cOuRw0=
github.com/VictoriaMetrics/metrics v1.18.1/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/VictoriaMetrics/metrics v1.18.1/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA=
github.com/VictoriaMetrics/metricsql v0.44.0 h1:zxBVeg9tbm6zl2ft2Ica87ItUWYey02hy3MN2ti1ljg= github.com/VictoriaMetrics/metricsql v0.44.1 h1:qGoRt0g84uMUscVjS7P3uDZKmjJubWKaIx9v0iHKgck=
github.com/VictoriaMetrics/metricsql v0.44.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= github.com/VictoriaMetrics/metricsql v0.44.1/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0=
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=

View file

@ -60,13 +60,6 @@ type regexpCacheValue struct {
err error err error
} }
func (rcv *regexpCacheValue) RegexpLen() int {
if r := rcv.r; r != nil {
return len(r.String())
}
return len(rcv.err.Error())
}
type regexpCache struct { type regexpCache struct {
// Move atomic counters to the top of struct for 8-byte alignment on 32-bit arch. // Move atomic counters to the top of struct for 8-byte alignment on 32-bit arch.
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/212 // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/212
@ -131,10 +124,10 @@ func (rc *regexpCache) Put(regexp string, rcv *regexpCacheValue) {
if rc.charsCurrent > rc.charsLimit { if rc.charsCurrent > rc.charsLimit {
// Remove items accounting for 10% chars from the cache. // Remove items accounting for 10% chars from the cache.
overflow := int(float64(rc.charsLimit) * 0.1) overflow := int(float64(rc.charsLimit) * 0.1)
for k, v := range rc.m { for k := range rc.m {
delete(rc.m, k) delete(rc.m, k)
size := len(k) + v.RegexpLen() size := len(k)
overflow -= size overflow -= size
rc.charsCurrent -= size rc.charsCurrent -= size
@ -144,6 +137,6 @@ func (rc *regexpCache) Put(regexp string, rcv *regexpCacheValue) {
} }
} }
rc.m[regexp] = rcv rc.m[regexp] = rcv
rc.charsCurrent += len(regexp) + rcv.RegexpLen() rc.charsCurrent += len(regexp)
rc.mu.Unlock() rc.mu.Unlock()
} }

2
vendor/modules.txt vendored
View file

@ -27,7 +27,7 @@ github.com/VictoriaMetrics/fasthttp/stackless
# github.com/VictoriaMetrics/metrics v1.18.1 # github.com/VictoriaMetrics/metrics v1.18.1
## explicit; go 1.12 ## explicit; go 1.12
github.com/VictoriaMetrics/metrics github.com/VictoriaMetrics/metrics
# github.com/VictoriaMetrics/metricsql v0.44.0 # github.com/VictoriaMetrics/metricsql v0.44.1
## explicit; go 1.13 ## explicit; go 1.13
github.com/VictoriaMetrics/metricsql github.com/VictoriaMetrics/metricsql
github.com/VictoriaMetrics/metricsql/binaryop github.com/VictoriaMetrics/metricsql/binaryop