vendor: update github.com/VictoriaMetrics/fastcache from v1.5.7 to v1.5.8

This commit is contained in:
Aliaksandr Valialkin 2021-03-03 15:52:27 +02:00
parent f391e5a3a0
commit 90d6e94e5b
6 changed files with 19 additions and 9 deletions

2
go.mod
View file

@ -3,7 +3,7 @@ module github.com/VictoriaMetrics/VictoriaMetrics
require (
cloud.google.com/go v0.78.0 // indirect
cloud.google.com/go/storage v1.14.0
github.com/VictoriaMetrics/fastcache v1.5.7
github.com/VictoriaMetrics/fastcache v1.5.8
// Do not use the original github.com/valyala/fasthttp because of issues
// like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b

4
go.sum
View file

@ -80,8 +80,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdko
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw=
github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8=
github.com/VictoriaMetrics/fastcache v1.5.8 h1:XW+YVx9lEXITBVv35ugK9OyotdNJVcbza69o3jmqWuI=
github.com/VictoriaMetrics/fastcache v1.5.8/go.mod h1:SiMZNgwEPJ9qWLshu9tyuE6bKc9ZWYhcNV/L7jurprQ=
github.com/VictoriaMetrics/fasthttp v1.0.12 h1:Ag0E119yrH4BTxVyjKD9TeiSImtG9bUcg/stItLJhSE=
github.com/VictoriaMetrics/fasthttp v1.0.12/go.mod h1:3SeUL4zwB/p/a9aEeRc6gdlbrtNHXBJR6N376EgiSHU=
github.com/VictoriaMetrics/metrics v1.12.2/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE=

View file

@ -72,10 +72,18 @@ func (c *Cache) SetBig(k, v []byte) {
// with values stored via other methods.
//
// k contents may be modified after returning from GetBig.
func (c *Cache) GetBig(dst, k []byte) []byte {
func (c *Cache) GetBig(dst, k []byte) (r []byte) {
atomic.AddUint64(&c.bigStats.GetBigCalls, 1)
subkey := getSubkeyBuf()
defer putSubkeyBuf(subkey)
dstWasNil := dst == nil
defer func() {
putSubkeyBuf(subkey)
if len(r) == 0 && dstWasNil {
// Guarantee that if the caller provided nil and this is a cache miss that
// the caller can accurately test for a cache miss with `if r == nil`.
r = nil
}
}()
// Read and parse metavalue
subkey.B = c.Get(subkey.B[:0], k)

View file

@ -1,9 +1,11 @@
module github.com/VictoriaMetrics/fastcache
go 1.13
require (
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156
github.com/cespare/xxhash/v2 v2.1.1
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/snappy v0.0.1
github.com/golang/snappy v0.0.3
github.com/stretchr/testify v1.3.0 // indirect
)

View file

@ -5,8 +5,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

2
vendor/modules.txt vendored
View file

@ -8,7 +8,7 @@ cloud.google.com/go/internal/trace
cloud.google.com/go/internal/version
# cloud.google.com/go/storage v1.14.0
cloud.google.com/go/storage
# github.com/VictoriaMetrics/fastcache v1.5.7
# github.com/VictoriaMetrics/fastcache v1.5.8
github.com/VictoriaMetrics/fastcache
# github.com/VictoriaMetrics/fasthttp v1.0.12
github.com/VictoriaMetrics/fasthttp