From 855e5c8963d24114d311219a4ab5c9d479757ffd Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2019 11:30:23 +0200 Subject: [PATCH] vendor: update github.com/VictoriaMetrics/fastcache from v1.5.1 to v1.5.2 --- go.mod | 2 +- go.sum | 4 ++-- .../VictoriaMetrics/fastcache/.travis.yml | 20 ------------------- .../VictoriaMetrics/fastcache/README.md | 2 +- .../VictoriaMetrics/fastcache/fastcache.go | 3 +++ .../VictoriaMetrics/fastcache/file.go | 3 +++ vendor/modules.txt | 2 +- 7 files changed, 11 insertions(+), 25 deletions(-) delete mode 100644 vendor/github.com/VictoriaMetrics/fastcache/.travis.yml diff --git a/go.mod b/go.mod index be84152bb..73cf671fe 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/VictoriaMetrics/VictoriaMetrics require ( - github.com/VictoriaMetrics/fastcache v1.5.1 + github.com/VictoriaMetrics/fastcache v1.5.2 github.com/VictoriaMetrics/metrics v1.7.2 github.com/cespare/xxhash/v2 v2.1.0 github.com/golang/snappy v0.0.1 diff --git a/go.sum b/go.sum index 959ffd5bb..0938bf5d0 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/VictoriaMetrics/fastcache v1.5.1 h1:qHgHjyoNFV7jgucU8QZUuU4gcdhfs8QW1kw68OD2Lag= -github.com/VictoriaMetrics/fastcache v1.5.1/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= +github.com/VictoriaMetrics/fastcache v1.5.2 h1:Erd8iIuBAL9kke8JzM4+WxkKuFkHh3ktwLanJvDgR44= +github.com/VictoriaMetrics/fastcache v1.5.2/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/metrics v1.7.2 h1:PzC0SEo5lbbNK7xaYwclCCdoaIGRmXOfflIMF3LpSW4= github.com/VictoriaMetrics/metrics v1.7.2/go.mod h1:LU2j9qq7xqZYXz8tF3/RQnB2z2MbZms5TDiIg9/NHiQ= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= diff --git a/vendor/github.com/VictoriaMetrics/fastcache/.travis.yml b/vendor/github.com/VictoriaMetrics/fastcache/.travis.yml deleted file mode 100644 index e103b76c8..000000000 --- a/vendor/github.com/VictoriaMetrics/fastcache/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go - -go: - - 1.11.x - -script: - # build test for supported platforms - - GOOS=linux go build - - GOOS=darwin go build - - GOOS=freebsd go build - - GOOS=windows go build - - GOARCH=386 go build - - # run tests on a standard platform - - go test -v ./... -coverprofile=coverage.txt -covermode=atomic - - go test -v ./... -race - -after_success: - # Upload coverage results to codecov.io - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/VictoriaMetrics/fastcache/README.md b/vendor/github.com/VictoriaMetrics/fastcache/README.md index ac6fbaf7f..b353214af 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/README.md +++ b/vendor/github.com/VictoriaMetrics/fastcache/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/VictoriaMetrics/fastcache.svg)](https://travis-ci.org/VictoriaMetrics/fastcache) +[![Build Status](https://github.com/VictoriaMetrics/fastcache/workflows/main/badge.svg)](https://github.com/VictoriaMetrics/fastcache/actions) [![GoDoc](https://godoc.org/github.com/VictoriaMetrics/fastcache?status.svg)](http://godoc.org/github.com/VictoriaMetrics/fastcache) [![Go Report](https://goreportcard.com/badge/github.com/VictoriaMetrics/fastcache)](https://goreportcard.com/report/github.com/VictoriaMetrics/fastcache) [![codecov](https://codecov.io/gh/VictoriaMetrics/fastcache/branch/master/graph/badge.svg)](https://codecov.io/gh/VictoriaMetrics/fastcache) diff --git a/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go b/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go index 7b5c7c21b..e5fe99dd5 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go +++ b/vendor/github.com/VictoriaMetrics/fastcache/fastcache.go @@ -226,6 +226,9 @@ type bucket struct { } func (b *bucket) Init(maxBytes uint64) { + if maxBytes == 0 { + panic(fmt.Errorf("maxBytes cannot be zero")) + } if maxBytes >= maxBucketSize { panic(fmt.Errorf("too big maxBytes=%d; should be smaller than %d", maxBytes, maxBucketSize)) } diff --git a/vendor/github.com/VictoriaMetrics/fastcache/file.go b/vendor/github.com/VictoriaMetrics/fastcache/file.go index 9c291afb0..de1bb07c5 100644 --- a/vendor/github.com/VictoriaMetrics/fastcache/file.go +++ b/vendor/github.com/VictoriaMetrics/fastcache/file.go @@ -312,6 +312,9 @@ func (b *bucket) Save(w io.Writer) error { } func (b *bucket) Load(r io.Reader, maxChunks uint64) error { + if maxChunks == 0 { + return fmt.Errorf("the number of chunks per bucket cannot be zero") + } bIdx, err := readUint64(r) if err != nil { return fmt.Errorf("cannot read b.idx: %s", err) diff --git a/vendor/modules.txt b/vendor/modules.txt index 3763ccdc2..5c12909af 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/VictoriaMetrics/fastcache v1.5.1 +# github.com/VictoriaMetrics/fastcache v1.5.2 github.com/VictoriaMetrics/fastcache # github.com/VictoriaMetrics/metrics v1.7.2 github.com/VictoriaMetrics/metrics