From a7b4ceb5f00a8d65b4fe3347194ba7a2abb7c97c Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Mon, 18 Sep 2023 12:34:43 -0700 Subject: [PATCH] include get_all, merge and total latency to store gateway series request log Signed-off-by: Ben Ye --- go.mod | 8 +- go.sum | 16 +- pkg/querier/blocks_store_queryable.go | 12 +- vendor/github.com/dgryski/go-metro/LICENSE | 24 -- vendor/github.com/dgryski/go-metro/README | 6 - vendor/github.com/dgryski/go-metro/metro.py | 199 ---------- .../github.com/dgryski/go-metro/metro128.go | 94 ----- vendor/github.com/dgryski/go-metro/metro64.go | 88 ----- .../github.com/dgryski/go-metro/metro_amd64.s | 372 ------------------ .../github.com/dgryski/go-metro/metro_stub.go | 10 - .../seiflotfy/cuckoofilter/.gitignore | 26 -- .../github.com/seiflotfy/cuckoofilter/LICENSE | 22 -- .../seiflotfy/cuckoofilter/README.md | 62 --- .../seiflotfy/cuckoofilter/bucket.go | 45 --- .../seiflotfy/cuckoofilter/cuckoofilter.go | 165 -------- .../github.com/seiflotfy/cuckoofilter/doc.go | 35 -- .../cuckoofilter/scalable_cuckoofilter.go | 170 -------- .../github.com/seiflotfy/cuckoofilter/util.go | 52 --- .../thanos-io/objstore/CHANGELOG.md | 4 + .../github.com/thanos-io/objstore/README.md | 3 + .../github.com/thanos-io/objstore/objstore.go | 30 +- .../objstore/providers/azure/azure.go | 27 +- .../objstore/providers/azure/helpers.go | 10 + .../thanos-io/objstore/providers/gcs/gcs.go | 10 +- .../thanos/pkg/cacheutil/async_op.go | 6 +- .../thanos/pkg/cacheutil/memcached_client.go | 2 +- .../pkg/compact/downsample/downsample.go | 11 +- .../thanos-io/thanos/pkg/store/bucket.go | 93 +---- .../thanos-io/thanos/pkg/store/flushable.go | 21 +- .../thanos/pkg/store/hintspb/custom.go | 3 + .../thanos/pkg/store/hintspb/hints.pb.go | 230 ++++++++--- .../thanos/pkg/store/hintspb/hints.proto | 3 + .../thanos-io/thanos/pkg/store/prometheus.go | 7 +- .../thanos-io/thanos/pkg/store/proxy_heap.go | 60 +-- .../thanos-io/thanos/pkg/store/tsdb.go | 43 +- .../thanos-io/thanos/pkg/stringset/set.go | 101 ----- vendor/golang.org/x/sys/cpu/cpu.go | 5 +- vendor/golang.org/x/sys/cpu/cpu_x86.go | 7 + vendor/golang.org/x/sys/unix/mkerrors.sh | 1 + vendor/golang.org/x/sys/unix/syscall_linux.go | 23 ++ vendor/golang.org/x/sys/unix/syscall_unix.go | 3 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 17 + .../golang.org/x/sys/unix/zsyscall_linux.go | 20 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 15 + .../x/sys/windows/syscall_windows.go | 11 +- .../x/sys/windows/zsyscall_windows.go | 26 +- vendor/modules.txt | 14 +- 47 files changed, 436 insertions(+), 1776 deletions(-) delete mode 100644 vendor/github.com/dgryski/go-metro/LICENSE delete mode 100644 vendor/github.com/dgryski/go-metro/README delete mode 100644 vendor/github.com/dgryski/go-metro/metro.py delete mode 100644 vendor/github.com/dgryski/go-metro/metro128.go delete mode 100644 vendor/github.com/dgryski/go-metro/metro64.go delete mode 100644 vendor/github.com/dgryski/go-metro/metro_amd64.s delete mode 100644 vendor/github.com/dgryski/go-metro/metro_stub.go delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/.gitignore delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/LICENSE delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/README.md delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/bucket.go delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/cuckoofilter.go delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/doc.go delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/scalable_cuckoofilter.go delete mode 100644 vendor/github.com/seiflotfy/cuckoofilter/util.go delete mode 100644 vendor/github.com/thanos-io/thanos/pkg/stringset/set.go diff --git a/go.mod b/go.mod index 2d3bd3850a..9291108471 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/sony/gobreaker v0.5.0 github.com/spf13/afero v1.9.5 github.com/stretchr/testify v1.8.4 - github.com/thanos-io/objstore v0.0.0-20230816175749-20395bffdf26 + github.com/thanos-io/objstore v0.0.0-20230913122821-eb06103887ab github.com/thanos-io/promql-engine v0.0.0-20230821193351-e1ae4275b96e github.com/thanos-io/thanos v0.32.3-0.20230911095949-f6a39507b6bd github.com/uber/jaeger-client-go v2.30.0+incompatible @@ -117,7 +117,6 @@ require ( github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/docker/go-units v0.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect @@ -190,7 +189,6 @@ require ( github.com/rs/cors v1.9.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect - github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb // indirect github.com/sercand/kuberesolver v2.4.0+incompatible // indirect github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect @@ -221,7 +219,7 @@ require ( golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/sys v0.12.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.11.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -264,3 +262,5 @@ replace github.com/google/gnostic => github.com/googleapis/gnostic v0.6.9 replace gopkg.in/alecthomas/kingpin.v2 => github.com/alecthomas/kingpin v1.3.8-0.20210301060133-17f40c25f497 replace github.com/sercand/kuberesolver => github.com/sercand/kuberesolver/v4 v4.0.0 + +replace github.com/thanos-io/thanos => github.com/yeya24/thanos v0.2.2-0.20230918182451-e0a5d841de76 diff --git a/go.sum b/go.sum index a89bbfe090..0b21bc9a9f 100644 --- a/go.sum +++ b/go.sum @@ -549,8 +549,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165 h1:BS21ZUJ/B5X2UVUbczfmdWH7GapPWAhxcMsDnjJTU1E= -github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dhui/dktest v0.3.16 h1:i6gq2YQEtcrjKbeJpBkWjE8MmLZPYllcjOFbTZuPDnw= @@ -1158,8 +1156,6 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb h1:XfLJSPIOUX+osiMraVgIrMR27uMXnRJWGm1+GL8/63U= -github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb/go.mod h1:bR6DqgcAl1zTcOX8/pE2Qkj9XO00eCNqmKb7lXP8EAg= github.com/sercand/kuberesolver/v4 v4.0.0 h1:frL7laPDG/lFm5n98ODmWnn+cvPpzlkf3LhzuPhcHP4= github.com/sercand/kuberesolver/v4 v4.0.0/go.mod h1:F4RGyuRmMAjeXHKL+w4P7AwUnPceEAPAhxUgXZjKgvM= github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs= @@ -1212,12 +1208,10 @@ github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNG github.com/tencentyun/cos-go-sdk-v5 v0.7.40 h1:W6vDGKCHe4wBACI1d2UgE6+50sJFhRWU4O8IB2ozzxM= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM= -github.com/thanos-io/objstore v0.0.0-20230816175749-20395bffdf26 h1:q1lin/af0lw+I3sS79ccHs2CLjFOPc190J9saeQ5qQ4= -github.com/thanos-io/objstore v0.0.0-20230816175749-20395bffdf26/go.mod h1:oJ82xgcBDzGJrEgUsjlTj6n01+ZWUMMUR8BlZzX5xDE= +github.com/thanos-io/objstore v0.0.0-20230913122821-eb06103887ab h1:IfcvGL/erj7I/P5Ugoae4lUFJQ/O71ELPdFtDSNtcCQ= +github.com/thanos-io/objstore v0.0.0-20230913122821-eb06103887ab/go.mod h1:oJ82xgcBDzGJrEgUsjlTj6n01+ZWUMMUR8BlZzX5xDE= github.com/thanos-io/promql-engine v0.0.0-20230821193351-e1ae4275b96e h1:kwsFCU8eSkZehbrAN3nXPw5RdMHi/Bok/y8l2C4M+gk= github.com/thanos-io/promql-engine v0.0.0-20230821193351-e1ae4275b96e/go.mod h1:+T/ZYNCGybT6eTsGGvVtGb63nT1cvUmH6MjqRrcQoKw= -github.com/thanos-io/thanos v0.32.3-0.20230911095949-f6a39507b6bd h1:JAXqwb/nzY7WzijekZrhrL63m988VLyoFUEaKLU15iA= -github.com/thanos-io/thanos v0.32.3-0.20230911095949-f6a39507b6bd/go.mod h1:J81dp4qaOX+GfPmRoYqu/aZXfEBri7+i3TzY2xamthg= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab/go.mod h1:eheTFp954zcWZXCU8d0AT76ftsQOTo4DTqkN/h3k1MY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -1240,6 +1234,8 @@ github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3k github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/yeya24/thanos v0.2.2-0.20230918182451-e0a5d841de76 h1:czelPDvh0+R9z+TnjjIIhgoI6kKpSo30VvLcEAHtGtU= +github.com/yeya24/thanos v0.2.2-0.20230918182451-e0a5d841de76/go.mod h1:MD/vJgwt6va80KWA3qELrNODEo1evehiKvulDVrNGKY= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1607,8 +1603,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/pkg/querier/blocks_store_queryable.go b/pkg/querier/blocks_store_queryable.go index 5729a82a17..d3291e1f16 100644 --- a/pkg/querier/blocks_store_queryable.go +++ b/pkg/querier/blocks_store_queryable.go @@ -609,6 +609,7 @@ func (q *blocksStoreQuerier) fetchSeriesFromStores( return errors.Wrapf(err, "failed to create series request") } + begin := time.Now() stream, err := c.Series(gCtx, req) if err != nil { if isRetryableError(err) { @@ -725,10 +726,10 @@ func (q *blocksStoreQuerier) fetchSeriesFromStores( "requested blocks", strings.Join(convertULIDsToString(blockIDs), " "), "queried blocks", strings.Join(convertULIDsToString(myQueriedBlocks), " ")) - // It is also interesting to look at data downloaded at store gateway even if - // no series got matched, but to reduce verbosity we are more interested in those - // matched case. With vertical sharding enabled it is easy to log too much. - if numSeries > 0 { + // Use number of blocks queried to check whether we should log the query + // or not. It might be logging too much but good to understand per request + // performance. + if seriesQueryStats.BlocksQueried > 0 { level.Info(spanLog).Log("msg", "store gateway series request stats", "instance", c.RemoteAddress(), "queryable_chunk_bytes_fetched", chunkBytes, @@ -753,6 +754,9 @@ func (q *blocksStoreQuerier) fetchSeriesFromStores( "chunks_fetch_count", seriesQueryStats.ChunksFetchCount, "chunks_fetched_size_sum", seriesQueryStats.ChunksFetchedSizeSum, "data_downloaded_size_sum", seriesQueryStats.DataDownloadedSizeSum, + "get_all_duration", seriesQueryStats.GetAllDuration, + "merge_duration", seriesQueryStats.MergeDuration, + "response_latency", time.Since(begin), ) } diff --git a/vendor/github.com/dgryski/go-metro/LICENSE b/vendor/github.com/dgryski/go-metro/LICENSE deleted file mode 100644 index 6243b617cf..0000000000 --- a/vendor/github.com/dgryski/go-metro/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This package is a mechanical translation of the reference C++ code for -MetroHash, available at https://github.com/jandrewrogers/MetroHash - -The MIT License (MIT) - -Copyright (c) 2016 Damian Gryski - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/dgryski/go-metro/README b/vendor/github.com/dgryski/go-metro/README deleted file mode 100644 index 5ecebb3853..0000000000 --- a/vendor/github.com/dgryski/go-metro/README +++ /dev/null @@ -1,6 +0,0 @@ -MetroHash - -This package is a mechanical translation of the reference C++ code for -MetroHash, available at https://github.com/jandrewrogers/MetroHash - -I claim no additional copyright over the original implementation. diff --git a/vendor/github.com/dgryski/go-metro/metro.py b/vendor/github.com/dgryski/go-metro/metro.py deleted file mode 100644 index 8dd4d26e6a..0000000000 --- a/vendor/github.com/dgryski/go-metro/metro.py +++ /dev/null @@ -1,199 +0,0 @@ -import peachpy.x86_64 - -k0 = 0xD6D018F5 -k1 = 0xA2AA033B -k2 = 0x62992FC1 -k3 = 0x30BC5B29 - -def advance(p,l,c): - ADD(p,c) - SUB(l,c) - -def imul(r,k): - t = GeneralPurposeRegister64() - MOV(t, k) - IMUL(r, t) - -def update32(v, p,idx, k, vadd): - r = GeneralPurposeRegister64() - MOV(r, [p + idx]) - imul(r, k) - ADD(v, r) - ROR(v, 29) - ADD(v, vadd) - -def final32(v, regs, keys): - r = GeneralPurposeRegister64() - MOV(r, v[regs[1]]) - ADD(r, v[regs[2]]) - imul(r, keys[0]) - ADD(r, v[regs[3]]) - ROR(r, 37) - imul(r, keys[1]) - XOR(v[regs[0]], r) - -seed = Argument(uint64_t) -buffer_base = Argument(ptr()) -buffer_len = Argument(int64_t) -buffer_cap = Argument(int64_t) - -def makeHash(name, args): - with Function(name, args, uint64_t) as function: - - reg_ptr = GeneralPurposeRegister64() - reg_ptr_len = GeneralPurposeRegister64() - reg_hash = GeneralPurposeRegister64() - - LOAD.ARGUMENT(reg_hash, seed) - LOAD.ARGUMENT(reg_ptr, buffer_base) - LOAD.ARGUMENT(reg_ptr_len, buffer_len) - - imul(reg_hash, k0) - r = GeneralPurposeRegister64() - MOV(r, k2*k0) - ADD(reg_hash, r) - - after32 = Label("after32") - - CMP(reg_ptr_len, 32) - JL(after32) - v = [GeneralPurposeRegister64() for _ in range(4)] - for i in range(4): - MOV(v[i], reg_hash) - - with Loop() as loop: - update32(v[0], reg_ptr, 0, k0, v[2]) - update32(v[1], reg_ptr, 8, k1, v[3]) - update32(v[2], reg_ptr, 16, k2, v[0]) - update32(v[3], reg_ptr, 24, k3, v[1]) - - ADD(reg_ptr, 32) - SUB(reg_ptr_len, 32) - CMP(reg_ptr_len, 32) - JGE(loop.begin) - - final32(v, [2,0,3,1], [k0, k1]) - final32(v, [3,1,2,0], [k1, k0]) - final32(v, [0,0,2,3], [k0, k1]) - final32(v, [1,1,3,2], [k1, k0]) - - XOR(v[0], v[1]) - ADD(reg_hash, v[0]) - - LABEL(after32) - - after16 = Label("after16") - CMP(reg_ptr_len, 16) - JL(after16) - - for i in range(2): - MOV(v[i], [reg_ptr]) - imul(v[i], k2) - ADD(v[i], reg_hash) - - advance(reg_ptr, reg_ptr_len, 8) - - ROR(v[i], 29) - imul(v[i], k3) - - r = GeneralPurposeRegister64() - MOV(r, v[0]) - imul(r, k0) - ROR(r, 21) - ADD(r, v[1]) - XOR(v[0], r) - - MOV(r, v[1]) - imul(r, k3) - ROR(r, 21) - ADD(r, v[0]) - XOR(v[1], r) - - ADD(reg_hash, v[1]) - - LABEL(after16) - - after8 = Label("after8") - CMP(reg_ptr_len, 8) - JL(after8) - - r = GeneralPurposeRegister64() - MOV(r, [reg_ptr]) - imul(r, k3) - ADD(reg_hash, r) - advance(reg_ptr, reg_ptr_len, 8) - - MOV(r, reg_hash) - ROR(r, 55) - imul(r, k1) - XOR(reg_hash, r) - - LABEL(after8) - - after4 = Label("after4") - CMP(reg_ptr_len, 4) - JL(after4) - - r = GeneralPurposeRegister64() - XOR(r, r) - MOV(r.as_dword, dword[reg_ptr]) - imul(r, k3) - ADD(reg_hash, r) - advance(reg_ptr, reg_ptr_len, 4) - - MOV(r, reg_hash) - ROR(r, 26) - imul(r, k1) - XOR(reg_hash, r) - - LABEL(after4) - - after2 = Label("after2") - CMP(reg_ptr_len, 2) - JL(after2) - - r = GeneralPurposeRegister64() - XOR(r,r) - MOV(r.as_word, word[reg_ptr]) - imul(r, k3) - ADD(reg_hash, r) - advance(reg_ptr, reg_ptr_len, 2) - - MOV(r, reg_hash) - ROR(r, 48) - imul(r, k1) - XOR(reg_hash, r) - - LABEL(after2) - - after1 = Label("after1") - CMP(reg_ptr_len, 1) - JL(after1) - - r = GeneralPurposeRegister64() - MOVZX(r, byte[reg_ptr]) - imul(r, k3) - ADD(reg_hash, r) - - MOV(r, reg_hash) - ROR(r, 37) - imul(r, k1) - XOR(reg_hash, r) - - LABEL(after1) - - r = GeneralPurposeRegister64() - MOV(r, reg_hash) - ROR(r, 28) - XOR(reg_hash, r) - - imul(reg_hash, k0) - - MOV(r, reg_hash) - ROR(r, 29) - XOR(reg_hash, r) - - RETURN(reg_hash) - -makeHash("Hash64", (buffer_base, buffer_len, buffer_cap, seed)) -makeHash("Hash64Str", (buffer_base, buffer_len, seed)) \ No newline at end of file diff --git a/vendor/github.com/dgryski/go-metro/metro128.go b/vendor/github.com/dgryski/go-metro/metro128.go deleted file mode 100644 index e8dd8ddbf5..0000000000 --- a/vendor/github.com/dgryski/go-metro/metro128.go +++ /dev/null @@ -1,94 +0,0 @@ -package metro - -import "encoding/binary" - -func rotate_right(v uint64, k uint) uint64 { - return (v >> k) | (v << (64 - k)) -} - -func Hash128(buffer []byte, seed uint64) (uint64, uint64) { - - const ( - k0 = 0xC83A91E1 - k1 = 0x8648DBDB - k2 = 0x7BDEC03B - k3 = 0x2F5870A5 - ) - - ptr := buffer - - var v [4]uint64 - - v[0] = (seed - k0) * k3 - v[1] = (seed + k1) * k2 - - if len(ptr) >= 32 { - v[2] = (seed + k0) * k2 - v[3] = (seed - k1) * k3 - - for len(ptr) >= 32 { - v[0] += binary.LittleEndian.Uint64(ptr) * k0 - ptr = ptr[8:] - v[0] = rotate_right(v[0], 29) + v[2] - v[1] += binary.LittleEndian.Uint64(ptr) * k1 - ptr = ptr[8:] - v[1] = rotate_right(v[1], 29) + v[3] - v[2] += binary.LittleEndian.Uint64(ptr) * k2 - ptr = ptr[8:] - v[2] = rotate_right(v[2], 29) + v[0] - v[3] += binary.LittleEndian.Uint64(ptr) * k3 - ptr = ptr[8:] - v[3] = rotate_right(v[3], 29) + v[1] - } - - v[2] ^= rotate_right(((v[0]+v[3])*k0)+v[1], 21) * k1 - v[3] ^= rotate_right(((v[1]+v[2])*k1)+v[0], 21) * k0 - v[0] ^= rotate_right(((v[0]+v[2])*k0)+v[3], 21) * k1 - v[1] ^= rotate_right(((v[1]+v[3])*k1)+v[2], 21) * k0 - } - - if len(ptr) >= 16 { - v[0] += binary.LittleEndian.Uint64(ptr) * k2 - ptr = ptr[8:] - v[0] = rotate_right(v[0], 33) * k3 - v[1] += binary.LittleEndian.Uint64(ptr) * k2 - ptr = ptr[8:] - v[1] = rotate_right(v[1], 33) * k3 - v[0] ^= rotate_right((v[0]*k2)+v[1], 45) * k1 - v[1] ^= rotate_right((v[1]*k3)+v[0], 45) * k0 - } - - if len(ptr) >= 8 { - v[0] += binary.LittleEndian.Uint64(ptr) * k2 - ptr = ptr[8:] - v[0] = rotate_right(v[0], 33) * k3 - v[0] ^= rotate_right((v[0]*k2)+v[1], 27) * k1 - } - - if len(ptr) >= 4 { - v[1] += uint64(binary.LittleEndian.Uint32(ptr)) * k2 - ptr = ptr[4:] - v[1] = rotate_right(v[1], 33) * k3 - v[1] ^= rotate_right((v[1]*k3)+v[0], 46) * k0 - } - - if len(ptr) >= 2 { - v[0] += uint64(binary.LittleEndian.Uint16(ptr)) * k2 - ptr = ptr[2:] - v[0] = rotate_right(v[0], 33) * k3 - v[0] ^= rotate_right((v[0]*k2)+v[1], 22) * k1 - } - - if len(ptr) >= 1 { - v[1] += uint64(ptr[0]) * k2 - v[1] = rotate_right(v[1], 33) * k3 - v[1] ^= rotate_right((v[1]*k3)+v[0], 58) * k0 - } - - v[0] += rotate_right((v[0]*k0)+v[1], 13) - v[1] += rotate_right((v[1]*k1)+v[0], 37) - v[0] += rotate_right((v[0]*k2)+v[1], 13) - v[1] += rotate_right((v[1]*k3)+v[0], 37) - - return v[0], v[1] -} diff --git a/vendor/github.com/dgryski/go-metro/metro64.go b/vendor/github.com/dgryski/go-metro/metro64.go deleted file mode 100644 index 1c04228a0b..0000000000 --- a/vendor/github.com/dgryski/go-metro/metro64.go +++ /dev/null @@ -1,88 +0,0 @@ -// +build noasm !amd64 gccgo - -package metro - -import ( - "encoding/binary" - "math/bits" -) - -func Hash64(buffer []byte, seed uint64) uint64 { - - const ( - k0 = 0xD6D018F5 - k1 = 0xA2AA033B - k2 = 0x62992FC1 - k3 = 0x30BC5B29 - ) - - ptr := buffer - - hash := (seed + k2) * k0 - - if len(ptr) >= 32 { - v0, v1, v2, v3 := hash, hash, hash, hash - - for len(ptr) >= 32 { - v0 += binary.LittleEndian.Uint64(ptr[:8]) * k0 - v0 = bits.RotateLeft64(v0, -29) + v2 - v1 += binary.LittleEndian.Uint64(ptr[8:16]) * k1 - v1 = bits.RotateLeft64(v1, -29) + v3 - v2 += binary.LittleEndian.Uint64(ptr[16:24]) * k2 - v2 = bits.RotateLeft64(v2, -29) + v0 - v3 += binary.LittleEndian.Uint64(ptr[24:32]) * k3 - v3 = bits.RotateLeft64(v3, -29) + v1 - ptr = ptr[32:] - } - - v2 ^= bits.RotateLeft64(((v0+v3)*k0)+v1, -37) * k1 - v3 ^= bits.RotateLeft64(((v1+v2)*k1)+v0, -37) * k0 - v0 ^= bits.RotateLeft64(((v0+v2)*k0)+v3, -37) * k1 - v1 ^= bits.RotateLeft64(((v1+v3)*k1)+v2, -37) * k0 - hash += v0 ^ v1 - } - - if len(ptr) >= 16 { - v0 := hash + (binary.LittleEndian.Uint64(ptr[:8]) * k2) - v0 = bits.RotateLeft64(v0, -29) * k3 - v1 := hash + (binary.LittleEndian.Uint64(ptr[8:16]) * k2) - v1 = bits.RotateLeft64(v1, -29) * k3 - v0 ^= bits.RotateLeft64(v0*k0, -21) + v1 - v1 ^= bits.RotateLeft64(v1*k3, -21) + v0 - hash += v1 - ptr = ptr[16:] - } - - if len(ptr) >= 8 { - hash += binary.LittleEndian.Uint64(ptr[:8]) * k3 - ptr = ptr[8:] - hash ^= bits.RotateLeft64(hash, -55) * k1 - } - - if len(ptr) >= 4 { - hash += uint64(binary.LittleEndian.Uint32(ptr[:4])) * k3 - hash ^= bits.RotateLeft64(hash, -26) * k1 - ptr = ptr[4:] - } - - if len(ptr) >= 2 { - hash += uint64(binary.LittleEndian.Uint16(ptr[:2])) * k3 - ptr = ptr[2:] - hash ^= bits.RotateLeft64(hash, -48) * k1 - } - - if len(ptr) >= 1 { - hash += uint64(ptr[0]) * k3 - hash ^= bits.RotateLeft64(hash, -37) * k1 - } - - hash ^= bits.RotateLeft64(hash, -28) - hash *= k0 - hash ^= bits.RotateLeft64(hash, -29) - - return hash -} - -func Hash64Str(buffer string, seed uint64) uint64 { - return Hash64([]byte(buffer), seed) -} diff --git a/vendor/github.com/dgryski/go-metro/metro_amd64.s b/vendor/github.com/dgryski/go-metro/metro_amd64.s deleted file mode 100644 index 7fa4730a48..0000000000 --- a/vendor/github.com/dgryski/go-metro/metro_amd64.s +++ /dev/null @@ -1,372 +0,0 @@ -// +build !noasm -// +build !gccgo - -// Generated by PeachPy 0.2.0 from metro.py - -// func Hash64(buffer_base uintptr, buffer_len int64, buffer_cap int64, seed uint64) uint64 -TEXT ·Hash64(SB),4,$0-40 - MOVQ seed+24(FP), AX - MOVQ buffer_base+0(FP), BX - MOVQ buffer_len+8(FP), CX - MOVQ $3603962101, DX - IMULQ DX, AX - MOVQ $5961697176435608501, DX - ADDQ DX, AX - CMPQ CX, $32 - JLT after32 - MOVQ AX, DX - MOVQ AX, DI - MOVQ AX, SI - MOVQ AX, BP -loop_begin: - MOVQ 0(BX), R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - ADDQ R8, DX - RORQ $29, DX - ADDQ SI, DX - MOVQ 8(BX), R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - ADDQ R8, DI - RORQ $29, DI - ADDQ BP, DI - MOVQ 16(BX), R8 - MOVQ $1654206401, R9 - IMULQ R9, R8 - ADDQ R8, SI - RORQ $29, SI - ADDQ DX, SI - MOVQ 24(BX), R8 - MOVQ $817650473, R9 - IMULQ R9, R8 - ADDQ R8, BP - RORQ $29, BP - ADDQ DI, BP - ADDQ $32, BX - SUBQ $32, CX - CMPQ CX, $32 - JGE loop_begin - MOVQ DX, R8 - ADDQ BP, R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - ADDQ DI, R8 - RORQ $37, R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - XORQ R8, SI - MOVQ DI, R8 - ADDQ SI, R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - ADDQ DX, R8 - RORQ $37, R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - XORQ R8, BP - MOVQ DX, R8 - ADDQ SI, R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - ADDQ BP, R8 - RORQ $37, R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - XORQ R8, DX - MOVQ DI, R8 - ADDQ BP, R8 - MOVQ $2729050939, BP - IMULQ BP, R8 - ADDQ SI, R8 - RORQ $37, R8 - MOVQ $3603962101, SI - IMULQ SI, R8 - XORQ R8, DI - XORQ DI, DX - ADDQ DX, AX -after32: - CMPQ CX, $16 - JLT after16 - MOVQ 0(BX), DX - MOVQ $1654206401, DI - IMULQ DI, DX - ADDQ AX, DX - ADDQ $8, BX - SUBQ $8, CX - RORQ $29, DX - MOVQ $817650473, DI - IMULQ DI, DX - MOVQ 0(BX), DI - MOVQ $1654206401, SI - IMULQ SI, DI - ADDQ AX, DI - ADDQ $8, BX - SUBQ $8, CX - RORQ $29, DI - MOVQ $817650473, SI - IMULQ SI, DI - MOVQ DX, SI - MOVQ $3603962101, BP - IMULQ BP, SI - RORQ $21, SI - ADDQ DI, SI - XORQ SI, DX - MOVQ DI, SI - MOVQ $817650473, BP - IMULQ BP, SI - RORQ $21, SI - ADDQ DX, SI - XORQ SI, DI - ADDQ DI, AX -after16: - CMPQ CX, $8 - JLT after8 - MOVQ 0(BX), DX - MOVQ $817650473, DI - IMULQ DI, DX - ADDQ DX, AX - ADDQ $8, BX - SUBQ $8, CX - MOVQ AX, DX - RORQ $55, DX - MOVQ $2729050939, DI - IMULQ DI, DX - XORQ DX, AX -after8: - CMPQ CX, $4 - JLT after4 - XORQ DX, DX - MOVL 0(BX), DX - MOVQ $817650473, DI - IMULQ DI, DX - ADDQ DX, AX - ADDQ $4, BX - SUBQ $4, CX - MOVQ AX, DX - RORQ $26, DX - MOVQ $2729050939, DI - IMULQ DI, DX - XORQ DX, AX -after4: - CMPQ CX, $2 - JLT after2 - XORQ DX, DX - MOVW 0(BX), DX - MOVQ $817650473, DI - IMULQ DI, DX - ADDQ DX, AX - ADDQ $2, BX - SUBQ $2, CX - MOVQ AX, DX - RORQ $48, DX - MOVQ $2729050939, DI - IMULQ DI, DX - XORQ DX, AX -after2: - CMPQ CX, $1 - JLT after1 - MOVBQZX 0(BX), BX - MOVQ $817650473, CX - IMULQ CX, BX - ADDQ BX, AX - MOVQ AX, BX - RORQ $37, BX - MOVQ $2729050939, CX - IMULQ CX, BX - XORQ BX, AX -after1: - MOVQ AX, BX - RORQ $28, BX - XORQ BX, AX - MOVQ $3603962101, BX - IMULQ BX, AX - MOVQ AX, BX - RORQ $29, BX - XORQ BX, AX - MOVQ AX, ret+32(FP) - RET - -// func Hash64Str(buffer_base uintptr, buffer_len int64, seed uint64) uint64 -TEXT ·Hash64Str(SB),4,$0-32 - MOVQ seed+16(FP), AX - MOVQ buffer_base+0(FP), BX - MOVQ buffer_len+8(FP), CX - MOVQ $3603962101, DX - IMULQ DX, AX - MOVQ $5961697176435608501, DX - ADDQ DX, AX - CMPQ CX, $32 - JLT after32 - MOVQ AX, DX - MOVQ AX, DI - MOVQ AX, SI - MOVQ AX, BP -loop_begin: - MOVQ 0(BX), R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - ADDQ R8, DX - RORQ $29, DX - ADDQ SI, DX - MOVQ 8(BX), R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - ADDQ R8, DI - RORQ $29, DI - ADDQ BP, DI - MOVQ 16(BX), R8 - MOVQ $1654206401, R9 - IMULQ R9, R8 - ADDQ R8, SI - RORQ $29, SI - ADDQ DX, SI - MOVQ 24(BX), R8 - MOVQ $817650473, R9 - IMULQ R9, R8 - ADDQ R8, BP - RORQ $29, BP - ADDQ DI, BP - ADDQ $32, BX - SUBQ $32, CX - CMPQ CX, $32 - JGE loop_begin - MOVQ DX, R8 - ADDQ BP, R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - ADDQ DI, R8 - RORQ $37, R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - XORQ R8, SI - MOVQ DI, R8 - ADDQ SI, R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - ADDQ DX, R8 - RORQ $37, R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - XORQ R8, BP - MOVQ DX, R8 - ADDQ SI, R8 - MOVQ $3603962101, R9 - IMULQ R9, R8 - ADDQ BP, R8 - RORQ $37, R8 - MOVQ $2729050939, R9 - IMULQ R9, R8 - XORQ R8, DX - MOVQ DI, R8 - ADDQ BP, R8 - MOVQ $2729050939, BP - IMULQ BP, R8 - ADDQ SI, R8 - RORQ $37, R8 - MOVQ $3603962101, SI - IMULQ SI, R8 - XORQ R8, DI - XORQ DI, DX - ADDQ DX, AX -after32: - CMPQ CX, $16 - JLT after16 - MOVQ 0(BX), DX - MOVQ $1654206401, DI - IMULQ DI, DX - ADDQ AX, DX - ADDQ $8, BX - SUBQ $8, CX - RORQ $29, DX - MOVQ $817650473, DI - IMULQ DI, DX - MOVQ 0(BX), DI - MOVQ $1654206401, SI - IMULQ SI, DI - ADDQ AX, DI - ADDQ $8, BX - SUBQ $8, CX - RORQ $29, DI - MOVQ $817650473, SI - IMULQ SI, DI - MOVQ DX, SI - MOVQ $3603962101, BP - IMULQ BP, SI - RORQ $21, SI - ADDQ DI, SI - XORQ SI, DX - MOVQ DI, SI - MOVQ $817650473, BP - IMULQ BP, SI - RORQ $21, SI - ADDQ DX, SI - XORQ SI, DI - ADDQ DI, AX -after16: - CMPQ CX, $8 - JLT after8 - MOVQ 0(BX), DX - MOVQ $817650473, DI - IMULQ DI, DX - ADDQ DX, AX - ADDQ $8, BX - SUBQ $8, CX - MOVQ AX, DX - RORQ $55, DX - MOVQ $2729050939, DI - IMULQ DI, DX - XORQ DX, AX -after8: - CMPQ CX, $4 - JLT after4 - XORQ DX, DX - MOVL 0(BX), DX - MOVQ $817650473, DI - IMULQ DI, DX - ADDQ DX, AX - ADDQ $4, BX - SUBQ $4, CX - MOVQ AX, DX - RORQ $26, DX - MOVQ $2729050939, DI - IMULQ DI, DX - XORQ DX, AX -after4: - CMPQ CX, $2 - JLT after2 - XORQ DX, DX - MOVW 0(BX), DX - MOVQ $817650473, DI - IMULQ DI, DX - ADDQ DX, AX - ADDQ $2, BX - SUBQ $2, CX - MOVQ AX, DX - RORQ $48, DX - MOVQ $2729050939, DI - IMULQ DI, DX - XORQ DX, AX -after2: - CMPQ CX, $1 - JLT after1 - MOVBQZX 0(BX), BX - MOVQ $817650473, CX - IMULQ CX, BX - ADDQ BX, AX - MOVQ AX, BX - RORQ $37, BX - MOVQ $2729050939, CX - IMULQ CX, BX - XORQ BX, AX -after1: - MOVQ AX, BX - RORQ $28, BX - XORQ BX, AX - MOVQ $3603962101, BX - IMULQ BX, AX - MOVQ AX, BX - RORQ $29, BX - XORQ BX, AX - MOVQ AX, ret+24(FP) - RET diff --git a/vendor/github.com/dgryski/go-metro/metro_stub.go b/vendor/github.com/dgryski/go-metro/metro_stub.go deleted file mode 100644 index 86ddcb4705..0000000000 --- a/vendor/github.com/dgryski/go-metro/metro_stub.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build !noasm,amd64 -// +build !gccgo - -package metro - -//go:generate python -m peachpy.x86_64 metro.py -S -o metro_amd64.s -mabi=goasm -//go:noescape - -func Hash64(buffer []byte, seed uint64) uint64 -func Hash64Str(buffer string, seed uint64) uint64 diff --git a/vendor/github.com/seiflotfy/cuckoofilter/.gitignore b/vendor/github.com/seiflotfy/cuckoofilter/.gitignore deleted file mode 100644 index 11b90db8d9..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -.idea diff --git a/vendor/github.com/seiflotfy/cuckoofilter/LICENSE b/vendor/github.com/seiflotfy/cuckoofilter/LICENSE deleted file mode 100644 index 58393c98c1..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Seif Lotfy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/github.com/seiflotfy/cuckoofilter/README.md b/vendor/github.com/seiflotfy/cuckoofilter/README.md deleted file mode 100644 index 2a77fb393f..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Cuckoo Filter - -[![GoDoc](https://godoc.org/github.com/seiflotfy/cuckoofilter?status.svg)](https://godoc.org/github.com/seiflotfy/cuckoofilter) [![CodeHunt.io](https://img.shields.io/badge/vote-codehunt.io-02AFD1.svg)](http://codehunt.io/sub/cuckoo-filter/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Cuckoo filter is a Bloom filter replacement for approximated set-membership queries. While Bloom filters are well-known space-efficient data structures to serve queries like "if item x is in a set?", they do not support deletion. Their variances to enable deletion (like counting Bloom filters) usually require much more space. - -Cuckoo filters provide the flexibility to add and remove items dynamically. A cuckoo filter is based on cuckoo hashing (and therefore named as cuckoo filter). It is essentially a cuckoo hash table storing each key's fingerprint. Cuckoo hash tables can be highly compact, thus a cuckoo filter could use less space than conventional Bloom filters, for applications that require low false positive rates (< 3%). - -For details about the algorithm and citations please use this article for now - -["Cuckoo Filter: Better Than Bloom" by Bin Fan, Dave Andersen and Michael Kaminsky](https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf) - -## Implementation details - -The paper cited above leaves several parameters to choose. In this implementation - -1. Every element has 2 possible bucket indices -2. Buckets have a static size of 4 fingerprints -3. Fingerprints have a static size of 8 bits - -1 and 2 are suggested to be the optimum by the authors. The choice of 3 comes down to the desired false positive rate. Given a target false positive rate of `r` and a bucket size `b`, they suggest choosing the fingerprint size `f` using - - f >= log2(2b/r) bits - -With the 8 bit fingerprint size in this repository, you can expect `r ~= 0.03`. -[Other implementations](https://github.com/panmari/cuckoofilter) use 16 bit, which correspond to a false positive rate of `r ~= 0.0001`. - -## Example usage: -```go -package main - -import "fmt" -import cuckoo "github.com/seiflotfy/cuckoofilter" - -func main() { - cf := cuckoo.NewFilter(1000) - cf.InsertUnique([]byte("geeky ogre")) - - // Lookup a string (and it a miss) if it exists in the cuckoofilter - cf.Lookup([]byte("hello")) - - count := cf.Count() - fmt.Println(count) // count == 1 - - // Delete a string (and it a miss) - cf.Delete([]byte("hello")) - - count = cf.Count() - fmt.Println(count) // count == 1 - - // Delete a string (a hit) - cf.Delete([]byte("geeky ogre")) - - count = cf.Count() - fmt.Println(count) // count == 0 - - cf.Reset() // reset -} -``` - -## Documentation: -["Cuckoo Filter on GoDoc"](http://godoc.org/github.com/seiflotfy/cuckoofilter) diff --git a/vendor/github.com/seiflotfy/cuckoofilter/bucket.go b/vendor/github.com/seiflotfy/cuckoofilter/bucket.go deleted file mode 100644 index 4a83fc5030..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/bucket.go +++ /dev/null @@ -1,45 +0,0 @@ -package cuckoo - -type fingerprint byte - -type bucket [bucketSize]fingerprint - -const ( - nullFp = 0 - bucketSize = 4 -) - -func (b *bucket) insert(fp fingerprint) bool { - for i, tfp := range b { - if tfp == nullFp { - b[i] = fp - return true - } - } - return false -} - -func (b *bucket) delete(fp fingerprint) bool { - for i, tfp := range b { - if tfp == fp { - b[i] = nullFp - return true - } - } - return false -} - -func (b *bucket) getFingerprintIndex(fp fingerprint) int { - for i, tfp := range b { - if tfp == fp { - return i - } - } - return -1 -} - -func (b *bucket) reset() { - for i := range b { - b[i] = nullFp - } -} diff --git a/vendor/github.com/seiflotfy/cuckoofilter/cuckoofilter.go b/vendor/github.com/seiflotfy/cuckoofilter/cuckoofilter.go deleted file mode 100644 index ec0d246de2..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/cuckoofilter.go +++ /dev/null @@ -1,165 +0,0 @@ -package cuckoo - -import ( - "fmt" - "math/bits" - "math/rand" -) - -const maxCuckooCount = 500 - -// Filter is a probabilistic counter -type Filter struct { - buckets []bucket - count uint - bucketPow uint -} - -// NewFilter returns a new cuckoofilter with a given capacity. -// A capacity of 1000000 is a normal default, which allocates -// about ~1MB on 64-bit machines. -func NewFilter(capacity uint) *Filter { - capacity = getNextPow2(uint64(capacity)) / bucketSize - if capacity == 0 { - capacity = 1 - } - buckets := make([]bucket, capacity) - return &Filter{ - buckets: buckets, - count: 0, - bucketPow: uint(bits.TrailingZeros(capacity)), - } -} - -// Lookup returns true if data is in the counter -func (cf *Filter) Lookup(data []byte) bool { - i1, fp := getIndexAndFingerprint(data, cf.bucketPow) - if cf.buckets[i1].getFingerprintIndex(fp) > -1 { - return true - } - i2 := getAltIndex(fp, i1, cf.bucketPow) - return cf.buckets[i2].getFingerprintIndex(fp) > -1 -} - -// Reset ... -func (cf *Filter) Reset() { - for i := range cf.buckets { - cf.buckets[i].reset() - } - cf.count = 0 -} - -func randi(i1, i2 uint) uint { - if rand.Intn(2) == 0 { - return i1 - } - return i2 -} - -// Insert inserts data into the counter and returns true upon success -func (cf *Filter) Insert(data []byte) bool { - i1, fp := getIndexAndFingerprint(data, cf.bucketPow) - if cf.insert(fp, i1) { - return true - } - i2 := getAltIndex(fp, i1, cf.bucketPow) - if cf.insert(fp, i2) { - return true - } - return cf.reinsert(fp, randi(i1, i2)) -} - -// InsertUnique inserts data into the counter if not exists and returns true upon success -func (cf *Filter) InsertUnique(data []byte) bool { - if cf.Lookup(data) { - return false - } - return cf.Insert(data) -} - -func (cf *Filter) insert(fp fingerprint, i uint) bool { - if cf.buckets[i].insert(fp) { - cf.count++ - return true - } - return false -} - -func (cf *Filter) reinsert(fp fingerprint, i uint) bool { - for k := 0; k < maxCuckooCount; k++ { - j := rand.Intn(bucketSize) - oldfp := fp - fp = cf.buckets[i][j] - cf.buckets[i][j] = oldfp - - // look in the alternate location for that random element - i = getAltIndex(fp, i, cf.bucketPow) - if cf.insert(fp, i) { - return true - } - } - return false -} - -// Delete data from counter if exists and return if deleted or not -func (cf *Filter) Delete(data []byte) bool { - i1, fp := getIndexAndFingerprint(data, cf.bucketPow) - if cf.delete(fp, i1) { - return true - } - i2 := getAltIndex(fp, i1, cf.bucketPow) - return cf.delete(fp, i2) -} - -func (cf *Filter) delete(fp fingerprint, i uint) bool { - if cf.buckets[i].delete(fp) { - if cf.count > 0 { - cf.count-- - } - return true - } - return false -} - -// Count returns the number of items in the counter -func (cf *Filter) Count() uint { - return cf.count -} - -// Encode returns a byte slice representing a Cuckoofilter -func (cf *Filter) Encode() []byte { - bytes := make([]byte, len(cf.buckets)*bucketSize) - for i, b := range cf.buckets { - for j, f := range b { - index := (i * len(b)) + j - bytes[index] = byte(f) - } - } - return bytes -} - -// Decode returns a Cuckoofilter from a byte slice -func Decode(bytes []byte) (*Filter, error) { - var count uint - if len(bytes)%bucketSize != 0 { - return nil, fmt.Errorf("expected bytes to be multiple of %d, got %d", bucketSize, len(bytes)) - } - if len(bytes) == 0 { - return nil, fmt.Errorf("bytes can not be empty") - } - buckets := make([]bucket, len(bytes)/4) - for i, b := range buckets { - for j := range b { - index := (i * len(b)) + j - if bytes[index] != 0 { - buckets[i][j] = fingerprint(bytes[index]) - count++ - } - } - } - return &Filter{ - buckets: buckets, - count: count, - bucketPow: uint(bits.TrailingZeros(uint(len(buckets)))), - }, nil -} diff --git a/vendor/github.com/seiflotfy/cuckoofilter/doc.go b/vendor/github.com/seiflotfy/cuckoofilter/doc.go deleted file mode 100644 index 6f6cbf8281..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -/* -Package cuckoo provides a Cuckoo Filter, a Bloom filter replacement for approximated set-membership queries. - -While Bloom filters are well-known space-efficient data structures to serve queries like "if item x is in a set?", they do not support deletion. Their variances to enable deletion (like counting Bloom filters) usually require much more space. - -Cuckoo filters provide the flexibility to add and remove items dynamically. A cuckoo filter is based on cuckoo hashing (and therefore named as cuckoo filter). It is essentially a cuckoo hash table storing each key's fingerprint. Cuckoo hash tables can be highly compact, thus a cuckoo filter could use less space than conventional Bloom filters, for applications that require low false positive rates (< 3%). - -For details about the algorithm and citations please use this article: - -"Cuckoo Filter: Better Than Bloom" by Bin Fan, Dave Andersen and Michael Kaminsky -(https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf) - -Note: -This implementation uses a a static bucket size of 4 fingerprints and a fingerprint size of 1 byte based on my understanding of an optimal bucket/fingerprint/size ratio from the aforementioned paper.*/ -package cuckoo diff --git a/vendor/github.com/seiflotfy/cuckoofilter/scalable_cuckoofilter.go b/vendor/github.com/seiflotfy/cuckoofilter/scalable_cuckoofilter.go deleted file mode 100644 index 693184c9d4..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/scalable_cuckoofilter.go +++ /dev/null @@ -1,170 +0,0 @@ -package cuckoo - -import ( - "bytes" - "encoding/gob" -) - -const ( - DefaultLoadFactor = 0.9 - DefaultCapacity = 10000 -) - -type ScalableCuckooFilter struct { - filters []*Filter - loadFactor float32 - //when scale(last filter size * loadFactor >= capacity) get new filter capacity - scaleFactor func(capacity uint) uint -} - -type option func(*ScalableCuckooFilter) - -type Store struct { - Bytes [][]byte - LoadFactor float32 -} - -/* - by default option the grow capacity is: - capacity , total - 4096 4096 - 8192 12288 -16384 28672 -32768 61440 -65536 126,976 -*/ -func NewScalableCuckooFilter(opts ...option) *ScalableCuckooFilter { - sfilter := new(ScalableCuckooFilter) - for _, opt := range opts { - opt(sfilter) - } - configure(sfilter) - return sfilter -} - -func (sf *ScalableCuckooFilter) Lookup(data []byte) bool { - for _, filter := range sf.filters { - if filter.Lookup(data) { - return true - } - } - return false -} - -func (sf *ScalableCuckooFilter) Reset() { - for _, filter := range sf.filters { - filter.Reset() - } -} - -func (sf *ScalableCuckooFilter) Insert(data []byte) bool { - needScale := false - lastFilter := sf.filters[len(sf.filters)-1] - if (float32(lastFilter.count) / float32(len(lastFilter.buckets))) > sf.loadFactor { - needScale = true - } else { - b := lastFilter.Insert(data) - needScale = !b - } - if !needScale { - return true - } - newFilter := NewFilter(sf.scaleFactor(uint(len(lastFilter.buckets)))) - sf.filters = append(sf.filters, newFilter) - return newFilter.Insert(data) -} - -func (sf *ScalableCuckooFilter) InsertUnique(data []byte) bool { - if sf.Lookup(data) { - return false - } - return sf.Insert(data) -} - -func (sf *ScalableCuckooFilter) Delete(data []byte) bool { - for _, filter := range sf.filters { - if filter.Delete(data) { - return true - } - } - return false -} - -func (sf *ScalableCuckooFilter) Count() uint { - var sum uint - for _, filter := range sf.filters { - sum += filter.count - } - return sum - -} - -func (sf *ScalableCuckooFilter) Encode() []byte { - slice := make([][]byte, len(sf.filters)) - for i, filter := range sf.filters { - encode := filter.Encode() - slice[i] = encode - } - store := &Store{ - Bytes: slice, - LoadFactor: sf.loadFactor, - } - buf := bytes.NewBuffer(nil) - enc := gob.NewEncoder(buf) - err := enc.Encode(store) - if err != nil { - return nil - } - return buf.Bytes() -} - -func (sf *ScalableCuckooFilter) DecodeWithParam(fBytes []byte, opts ...option) (*ScalableCuckooFilter, error) { - instance, err := DecodeScalableFilter(fBytes) - if err != nil { - return nil, err - } - for _, opt := range opts { - opt(instance) - } - return instance, nil -} - -func DecodeScalableFilter(fBytes []byte) (*ScalableCuckooFilter, error) { - buf := bytes.NewBuffer(fBytes) - dec := gob.NewDecoder(buf) - store := &Store{} - err := dec.Decode(store) - if err != nil { - return nil, err - } - filterSize := len(store.Bytes) - instance := NewScalableCuckooFilter(func(filter *ScalableCuckooFilter) { - filter.filters = make([]*Filter, filterSize) - }, func(filter *ScalableCuckooFilter) { - filter.loadFactor = store.LoadFactor - }) - for i, oneBytes := range store.Bytes { - filter, err := Decode(oneBytes) - if err != nil { - return nil, err - } - instance.filters[i] = filter - } - return instance, nil - -} - -func configure(sfilter *ScalableCuckooFilter) { - if sfilter.loadFactor == 0 { - sfilter.loadFactor = DefaultLoadFactor - } - if sfilter.scaleFactor == nil { - sfilter.scaleFactor = func(currentSize uint) uint { - return currentSize * bucketSize * 2 - } - } - if sfilter.filters == nil { - initFilter := NewFilter(DefaultCapacity) - sfilter.filters = []*Filter{initFilter} - } -} diff --git a/vendor/github.com/seiflotfy/cuckoofilter/util.go b/vendor/github.com/seiflotfy/cuckoofilter/util.go deleted file mode 100644 index 2a0f65b130..0000000000 --- a/vendor/github.com/seiflotfy/cuckoofilter/util.go +++ /dev/null @@ -1,52 +0,0 @@ -package cuckoo - -import ( - metro "github.com/dgryski/go-metro" -) - -var ( - altHash = [256]uint{} - masks = [65]uint{} -) - -func init() { - for i := 0; i < 256; i++ { - altHash[i] = (uint(metro.Hash64([]byte{byte(i)}, 1337))) - } - for i := uint(0); i <= 64; i++ { - masks[i] = (1 << i) - 1 - } -} - -func getAltIndex(fp fingerprint, i uint, bucketPow uint) uint { - mask := masks[bucketPow] - hash := altHash[fp] & mask - return (i & mask) ^ hash -} - -func getFingerprint(hash uint64) byte { - // Use least significant bits for fingerprint. - fp := byte(hash%255 + 1) - return fp -} - -// getIndicesAndFingerprint returns the 2 bucket indices and fingerprint to be used -func getIndexAndFingerprint(data []byte, bucketPow uint) (uint, fingerprint) { - hash := metro.Hash64(data, 1337) - fp := getFingerprint(hash) - // Use most significant bits for deriving index. - i1 := uint(hash>>32) & masks[bucketPow] - return i1, fingerprint(fp) -} - -func getNextPow2(n uint64) uint { - n-- - n |= n >> 1 - n |= n >> 2 - n |= n >> 4 - n |= n >> 8 - n |= n >> 16 - n |= n >> 32 - n++ - return uint(n) -} diff --git a/vendor/github.com/thanos-io/objstore/CHANGELOG.md b/vendor/github.com/thanos-io/objstore/CHANGELOG.md index 23e92b8c16..72f8f180f6 100644 --- a/vendor/github.com/thanos-io/objstore/CHANGELOG.md +++ b/vendor/github.com/thanos-io/objstore/CHANGELOG.md @@ -27,7 +27,11 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#61](https://github.com/thanos-io/objstore/pull/61) Add OpenTelemetry TracingBucket. > This also changes the behaviour of `client.NewBucket`. Now it returns, uninstrumented and untraced bucket. You can combine `objstore.WrapWithMetrics` and `tracing/{opentelemetry,opentracing}.WrapWithTraces` to have old behavior. +- [#69](https://github.com/thanos-io/objstore/pull/69) [#66](https://github.com/thanos-io/objstore/pull/66) Add `objstore_bucket_operation_transferred_bytes` that counts the number of total bytes read from the bucket operation Get/GetRange and also counts the number of total bytes written to the bucket operation Upload. - [#64](https://github.com/thanos-io/objstore/pull/64) OCI: OKE Workload Identity support. +- [#73](https://github.com/thanos-io/objstore/pull/73) Аdded file path to erros from DownloadFile +- [#51](https://github.com/thanos-io/objstore/pull/51) Azure: Support using connection string authentication. +- [#76](https://github.com/thanos-io/objstore/pull/76) GCS: Query for object names only in `Iter` to possibly improve performance when listing objects. ### Changed - [#38](https://github.com/thanos-io/objstore/pull/38) *: Upgrade minio-go version to `v7.0.45`. diff --git a/vendor/github.com/thanos-io/objstore/README.md b/vendor/github.com/thanos-io/objstore/README.md index c9dbe34d55..2a1552714c 100644 --- a/vendor/github.com/thanos-io/objstore/README.md +++ b/vendor/github.com/thanos-io/objstore/README.md @@ -419,6 +419,7 @@ type: AZURE config: storage_account: "" storage_account_key: "" + storage_connection_string: "" container: "" endpoint: "" user_assigned_id: "" @@ -454,6 +455,8 @@ If `msi_resource` is used, authentication is done via system-assigned managed id If `user_assigned_id` is used, authentication is done via user-assigned managed identity. When using `user_assigned_id` the `msi_resource` defaults to `https://.` +If `storage_connection_string` is set, the values of `storage_account` and `endpoint` values will not be used. Use this method over `storage_account_key` if you need to authenticate via a SAS token. + The generic `max_retries` will be used as value for the `pipeline_config`'s `max_tries` and `reader_config`'s `max_retry_requests`. For more control, `max_retries` could be ignored (0) and one could set specific retry values. ##### OpenStack Swift diff --git a/vendor/github.com/thanos-io/objstore/objstore.go b/vendor/github.com/thanos-io/objstore/objstore.go index b9b56bf4fa..5bcc55f18b 100644 --- a/vendor/github.com/thanos-io/objstore/objstore.go +++ b/vendor/github.com/thanos-io/objstore/objstore.go @@ -315,7 +315,7 @@ func DownloadFile(ctx context.Context, logger log.Logger, bkt BucketReader, src, f, err := os.Create(dst) if err != nil { - return errors.Wrap(err, "create file") + return errors.Wrapf(err, "create file %s", dst) } defer func() { if err != nil { @@ -327,7 +327,7 @@ func DownloadFile(ctx context.Context, logger log.Logger, bkt BucketReader, src, defer logerrcapture.Do(logger, f.Close, "close block's output file") if _, err = io.Copy(f, rc); err != nil { - return errors.Wrap(err, "copy object to file") + return errors.Wrapf(err, "copy object to file %s", src) } return nil } @@ -458,11 +458,12 @@ func WrapWithMetrics(b Bucket, reg prometheus.Registerer, name string) *metricBu bkt.opsDuration.WithLabelValues(op) bkt.opsFetchedBytes.WithLabelValues(op) } - // fetched bytes only relevant for get and getrange + + // fetched bytes only relevant for get, getrange and upload for _, op := range []string{ OpGet, OpGetRange, - // TODO: Add uploads + OpUpload, } { bkt.opsTransferredBytes.WithLabelValues(op) } @@ -592,15 +593,25 @@ func (b *metricBucket) Upload(ctx context.Context, name string, r io.Reader) err const op = OpUpload b.ops.WithLabelValues(op).Inc() - start := time.Now() - if err := b.bkt.Upload(ctx, name, r); err != nil { + trc := newTimingReadCloser( + io.NopCloser(r), + op, + b.opsDuration, + b.opsFailures, + b.isOpFailureExpected, + nil, + b.opsTransferredBytes, + ) + defer trc.Close() + err := b.bkt.Upload(ctx, name, trc) + if err != nil { if !b.isOpFailureExpected(err) && ctx.Err() != context.Canceled { b.opsFailures.WithLabelValues(op).Inc() } return err } b.lastSuccessfulUploadTime.SetToCurrentTime() - b.opsDuration.WithLabelValues(op).Observe(time.Since(start).Seconds()) + return nil } @@ -692,7 +703,10 @@ func (rc *timingReadCloser) Close() error { func (rc *timingReadCloser) Read(b []byte) (n int, err error) { n, err = rc.ReadCloser.Read(b) - rc.fetchedBytes.WithLabelValues(rc.op).Add(float64(n)) + if rc.fetchedBytes != nil { + rc.fetchedBytes.WithLabelValues(rc.op).Add(float64(n)) + } + rc.readBytes += int64(n) // Report metric just once. if !rc.alreadyGotErr && err != nil && err != io.EOF { diff --git a/vendor/github.com/thanos-io/objstore/providers/azure/azure.go b/vendor/github.com/thanos-io/objstore/providers/azure/azure.go index 376fb6290f..a72f30528e 100644 --- a/vendor/github.com/thanos-io/objstore/providers/azure/azure.go +++ b/vendor/github.com/thanos-io/objstore/providers/azure/azure.go @@ -44,15 +44,16 @@ var DefaultConfig = Config{ // Config Azure storage configuration. type Config struct { - StorageAccountName string `yaml:"storage_account"` - StorageAccountKey string `yaml:"storage_account_key"` - ContainerName string `yaml:"container"` - Endpoint string `yaml:"endpoint"` - UserAssignedID string `yaml:"user_assigned_id"` - MaxRetries int `yaml:"max_retries"` - ReaderConfig ReaderConfig `yaml:"reader_config"` - PipelineConfig PipelineConfig `yaml:"pipeline_config"` - HTTPConfig exthttp.HTTPConfig `yaml:"http_config"` + StorageAccountName string `yaml:"storage_account"` + StorageAccountKey string `yaml:"storage_account_key"` + StorageConnectionString string `yaml:"storage_connection_string"` + ContainerName string `yaml:"container"` + Endpoint string `yaml:"endpoint"` + UserAssignedID string `yaml:"user_assigned_id"` + MaxRetries int `yaml:"max_retries"` + ReaderConfig ReaderConfig `yaml:"reader_config"` + PipelineConfig PipelineConfig `yaml:"pipeline_config"` + HTTPConfig exthttp.HTTPConfig `yaml:"http_config"` // Deprecated: Is automatically set by the Azure SDK. MSIResource string `yaml:"msi_resource"` @@ -76,6 +77,14 @@ func (conf *Config) validate() error { errMsg = append(errMsg, "user_assigned_id cannot be set when using storage_account_key authentication") } + if conf.UserAssignedID != "" && conf.StorageConnectionString != "" { + errMsg = append(errMsg, "user_assigned_id cannot be set when using storage_connection_string authentication") + } + + if conf.StorageAccountKey != "" && conf.StorageConnectionString != "" { + errMsg = append(errMsg, "storage_account_key and storage_connection_string cannot both be set") + } + if conf.StorageAccountName == "" { errMsg = append(errMsg, "storage_account_name is required but not configured") } diff --git a/vendor/github.com/thanos-io/objstore/providers/azure/helpers.go b/vendor/github.com/thanos-io/objstore/providers/azure/helpers.go index b76154d6c2..7b4a5fbe51 100644 --- a/vendor/github.com/thanos-io/objstore/providers/azure/helpers.go +++ b/vendor/github.com/thanos-io/objstore/providers/azure/helpers.go @@ -38,6 +38,16 @@ func getContainerClient(conf Config) (*container.Client, error) { Transport: &http.Client{Transport: dt}, }, } + + // Use connection string if set + if conf.StorageConnectionString != "" { + containerClient, err := container.NewClientFromConnectionString(conf.StorageConnectionString, conf.ContainerName, opt) + if err != nil { + return nil, err + } + return containerClient, nil + } + containerURL := fmt.Sprintf("https://%s.%s/%s", conf.StorageAccountName, conf.Endpoint, conf.ContainerName) // Use shared keys if set diff --git a/vendor/github.com/thanos-io/objstore/providers/gcs/gcs.go b/vendor/github.com/thanos-io/objstore/providers/gcs/gcs.go index 5ea45c7e97..ad305d6e15 100644 --- a/vendor/github.com/thanos-io/objstore/providers/gcs/gcs.go +++ b/vendor/github.com/thanos-io/objstore/providers/gcs/gcs.go @@ -108,10 +108,16 @@ func (b *Bucket) Iter(ctx context.Context, dir string, f func(string) error, opt delimiter = "" } - it := b.bkt.Objects(ctx, &storage.Query{ + query := &storage.Query{ Prefix: dir, Delimiter: delimiter, - }) + } + err := query.SetAttrSelection([]string{"Name"}) + if err != nil { + return err + } + + it := b.bkt.Objects(ctx, query) for { select { case <-ctx.Done(): diff --git a/vendor/github.com/thanos-io/thanos/pkg/cacheutil/async_op.go b/vendor/github.com/thanos-io/thanos/pkg/cacheutil/async_op.go index b2b977f908..524d2fdba2 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/cacheutil/async_op.go +++ b/vendor/github.com/thanos-io/thanos/pkg/cacheutil/async_op.go @@ -5,8 +5,6 @@ package cacheutil import ( "sync" - - "github.com/pkg/errors" ) type asyncOperationProcessor struct { @@ -54,13 +52,11 @@ func (p *asyncOperationProcessor) asyncQueueProcessLoop() { } } -var errAsyncBufferFull = errors.New("the async buffer is full") - func (p *asyncOperationProcessor) enqueueAsync(op func()) error { select { case p.asyncQueue <- op: return nil default: - return errAsyncBufferFull + return errMemcachedAsyncBufferFull } } diff --git a/vendor/github.com/thanos-io/thanos/pkg/cacheutil/memcached_client.go b/vendor/github.com/thanos-io/thanos/pkg/cacheutil/memcached_client.go index f34f97abd7..55d07d9d5a 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/cacheutil/memcached_client.go +++ b/vendor/github.com/thanos-io/thanos/pkg/cacheutil/memcached_client.go @@ -400,7 +400,7 @@ func (c *memcachedClient) SetAsync(key string, value []byte, ttl time.Duration) c.duration.WithLabelValues(opSet).Observe(time.Since(start).Seconds()) }) - if err == errMemcachedAsyncBufferFull { + if errors.Is(err, errMemcachedAsyncBufferFull) { c.skipped.WithLabelValues(opSet, reasonAsyncBufferFull).Inc() level.Debug(c.logger).Log("msg", "failed to store item to memcached because the async buffer is full", "err", err, "size", len(c.p.asyncQueue)) return nil diff --git a/vendor/github.com/thanos-io/thanos/pkg/compact/downsample/downsample.go b/vendor/github.com/thanos-io/thanos/pkg/compact/downsample/downsample.go index 78b615f904..51d895058a 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/compact/downsample/downsample.go +++ b/vendor/github.com/thanos-io/thanos/pkg/compact/downsample/downsample.go @@ -372,8 +372,17 @@ func downsampleRawLoop(data []sample, resolution int64, numChunks int) []chunks. for ; j < len(data) && data[j].t <= curW; j++ { } - batch := data[:j] + batch := make([]sample, 0, j) + for _, s := range data[:j] { + if math.IsNaN(s.v) { + continue + } + batch = append(batch, s) + } data = data[j:] + if len(batch) == 0 { + continue + } ab := newAggrChunkBuilder() diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go b/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go index 4a8eae4572..d5e4311080 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go @@ -59,7 +59,6 @@ import ( "github.com/thanos-io/thanos/pkg/store/hintspb" "github.com/thanos-io/thanos/pkg/store/labelpb" "github.com/thanos-io/thanos/pkg/store/storepb" - "github.com/thanos-io/thanos/pkg/stringset" "github.com/thanos-io/thanos/pkg/strutil" "github.com/thanos-io/thanos/pkg/tenancy" "github.com/thanos-io/thanos/pkg/tracing" @@ -387,9 +386,6 @@ type BucketStore struct { enabledLazyExpandedPostings bool - bmtx sync.Mutex - labelNamesSet stringset.Set - blockEstimatedMaxSeriesFunc BlockEstimator blockEstimatedMaxChunkFunc BlockEstimator } @@ -543,7 +539,6 @@ func NewBucketStore( enableSeriesResponseHints: enableSeriesResponseHints, enableChunkHashCalculation: enableChunkHashCalculation, seriesBatchSize: SeriesBatchSize, - labelNamesSet: stringset.AllStrings(), } for _, option := range options { @@ -1334,7 +1329,8 @@ func debugFoundBlockSetOverview(logger log.Logger, mint, maxt, maxResolutionMill // Series implements the storepb.StoreServer interface. func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store_SeriesServer) (err error) { - srv := newFlushableServer(seriesSrv, s.LabelNamesSet(), req.WithoutReplicaLabels) + srv := newFlushableServer(seriesSrv, sortingStrategyNone) + if s.queryGate != nil { tracing.DoInSpan(srv.Context(), "store_query_gate_ismyturn", func(ctx context.Context) { err = s.queryGate.Start(srv.Context()) @@ -1464,44 +1460,19 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store return errors.Wrapf(err, "fetch postings for block %s", blk.meta.ULID) } - // If we have inner replica labels we need to resort. - s.mtx.Lock() - needsEagerRetrival := len(req.WithoutReplicaLabels) > 0 && s.labelNamesSet.HasAny(req.WithoutReplicaLabels) - s.mtx.Unlock() - - var resp respSet - if needsEagerRetrival { - labelsToRemove := make(map[string]struct{}) - for _, replicaLabel := range req.WithoutReplicaLabels { - labelsToRemove[replicaLabel] = struct{}{} - } - resp = newEagerRespSet( - srv.Context(), - span, - 10*time.Minute, - blk.meta.ULID.String(), - []labels.Labels{blk.extLset}, - onClose, - blockClient, - shardMatcher, - false, - s.metrics.emptyPostingCount, - labelsToRemove, - ) - } else { - resp = newLazyRespSet( - srv.Context(), - span, - 10*time.Minute, - blk.meta.ULID.String(), - []labels.Labels{blk.extLset}, - onClose, - blockClient, - shardMatcher, - false, - s.metrics.emptyPostingCount, - ) - } + resp := newEagerRespSet( + srv.Context(), + span, + 10*time.Minute, + blk.meta.ULID.String(), + []labels.Labels{blk.extLset}, + onClose, + blockClient, + shardMatcher, + false, + s.metrics.emptyPostingCount, + nil, + ) mtx.Lock() respSets = append(respSets, resp) @@ -1814,38 +1785,6 @@ func (s *BucketStore) LabelNames(ctx context.Context, req *storepb.LabelNamesReq }, nil } -func (s *BucketStore) UpdateLabelNames() { - s.mtx.RLock() - defer s.mtx.RUnlock() - - newSet := stringset.New() - for _, b := range s.blocks { - labelNames, err := b.indexHeaderReader.LabelNames() - if err != nil { - level.Warn(s.logger).Log("msg", "error getting label names", "block", b.meta.ULID, "err", err.Error()) - s.updateLabelNamesSet(stringset.AllStrings()) - return - } - for _, l := range labelNames { - newSet.Insert(l) - } - } - s.updateLabelNamesSet(newSet) -} - -func (s *BucketStore) updateLabelNamesSet(newSet stringset.Set) { - s.bmtx.Lock() - s.labelNamesSet = newSet - s.bmtx.Unlock() -} - -func (b *BucketStore) LabelNamesSet() stringset.Set { - b.bmtx.Lock() - defer b.bmtx.Unlock() - - return b.labelNamesSet -} - func (b *bucketBlock) FilterExtLabelsMatchers(matchers []*labels.Matcher) ([]*labels.Matcher, bool) { // We filter external labels from matchers so we won't try to match series on them. var result []*labels.Matcher @@ -3708,6 +3647,8 @@ func (s queryStats) toHints() *hintspb.QueryStats { MergedSeriesCount: int64(s.mergedSeriesCount), MergedChunksCount: int64(s.mergedChunksCount), DataDownloadedSizeSum: int64(s.DataDownloadedSizeSum), + GetAllDuration: s.GetAllDuration, + MergeDuration: s.MergeDuration, } } diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/flushable.go b/vendor/github.com/thanos-io/thanos/pkg/store/flushable.go index c41b67d152..e6cadfbea9 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/flushable.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/flushable.go @@ -9,24 +9,35 @@ import ( "github.com/thanos-io/thanos/pkg/store/labelpb" "github.com/thanos-io/thanos/pkg/store/storepb" - "github.com/thanos-io/thanos/pkg/stringset" +) + +type sortingStrategy uint64 + +const ( + sortingStrategyStore sortingStrategy = iota + 1 + sortingStrategyNone ) // flushableServer is an extension of storepb.Store_SeriesServer with a Flush method. type flushableServer interface { storepb.Store_SeriesServer + Flush() error } func newFlushableServer( upstream storepb.Store_SeriesServer, - labelNames stringset.Set, - replicaLabels []string, + sortingsortingStrategy sortingStrategy, ) flushableServer { - if labelNames.HasAny(replicaLabels) { + switch sortingsortingStrategy { + case sortingStrategyStore: return &resortingServer{Store_SeriesServer: upstream} + case sortingStrategyNone: + return &passthroughServer{Store_SeriesServer: upstream} + default: + // should not happen. + panic("unexpected sorting strategy") } - return &passthroughServer{Store_SeriesServer: upstream} } // passthroughServer is a flushableServer that forwards all data to diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/custom.go b/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/custom.go index 9d7da86e94..bf82d245e2 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/custom.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/custom.go @@ -47,4 +47,7 @@ func (m *QueryStats) Merge(other *QueryStats) { m.ChunksFetchedSizeSum += other.ChunksFetchedSizeSum m.ChunksTouched += other.ChunksTouched m.ChunksTouchedSizeSum += other.ChunksTouchedSizeSum + + m.GetAllDuration += other.GetAllDuration + m.MergeDuration += other.MergeDuration } diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go b/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go index 457793cf6a..2098d7489c 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go @@ -5,12 +5,16 @@ package hintspb import ( fmt "fmt" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + io "io" math "math" math_bits "math/bits" + time "time" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" storepb "github.com/thanos-io/thanos/pkg/store/storepb" ) @@ -18,6 +22,7 @@ import ( var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -301,26 +306,28 @@ var xxx_messageInfo_LabelValuesResponseHints proto.InternalMessageInfo // / QueryStats fields are unstable and might change in the future. type QueryStats struct { - BlocksQueried int64 `protobuf:"varint,1,opt,name=blocks_queried,json=blocksQueried,proto3" json:"blocks_queried,omitempty"` - MergedSeriesCount int64 `protobuf:"varint,2,opt,name=merged_series_count,json=mergedSeriesCount,proto3" json:"merged_series_count,omitempty"` - MergedChunksCount int64 `protobuf:"varint,3,opt,name=merged_chunks_count,json=mergedChunksCount,proto3" json:"merged_chunks_count,omitempty"` - PostingsTouched int64 `protobuf:"varint,4,opt,name=postings_touched,json=postingsTouched,proto3" json:"postings_touched,omitempty"` - PostingsTouchedSizeSum int64 `protobuf:"varint,5,opt,name=postings_touched_size_sum,json=postingsTouchedSizeSum,proto3" json:"postings_touched_size_sum,omitempty"` - PostingsToFetch int64 `protobuf:"varint,6,opt,name=postings_to_fetch,json=postingsToFetch,proto3" json:"postings_to_fetch,omitempty"` - PostingsFetched int64 `protobuf:"varint,7,opt,name=postings_fetched,json=postingsFetched,proto3" json:"postings_fetched,omitempty"` - PostingsFetchedSizeSum int64 `protobuf:"varint,8,opt,name=postings_fetched_size_sum,json=postingsFetchedSizeSum,proto3" json:"postings_fetched_size_sum,omitempty"` - PostingsFetchCount int64 `protobuf:"varint,9,opt,name=postings_fetch_count,json=postingsFetchCount,proto3" json:"postings_fetch_count,omitempty"` - SeriesTouched int64 `protobuf:"varint,10,opt,name=series_touched,json=seriesTouched,proto3" json:"series_touched,omitempty"` - SeriesTouchedSizeSum int64 `protobuf:"varint,11,opt,name=series_touched_size_sum,json=seriesTouchedSizeSum,proto3" json:"series_touched_size_sum,omitempty"` - SeriesFetched int64 `protobuf:"varint,12,opt,name=series_fetched,json=seriesFetched,proto3" json:"series_fetched,omitempty"` - SeriesFetchedSizeSum int64 `protobuf:"varint,13,opt,name=series_fetched_size_sum,json=seriesFetchedSizeSum,proto3" json:"series_fetched_size_sum,omitempty"` - SeriesFetchCount int64 `protobuf:"varint,14,opt,name=series_fetch_count,json=seriesFetchCount,proto3" json:"series_fetch_count,omitempty"` - ChunksTouched int64 `protobuf:"varint,15,opt,name=chunks_touched,json=chunksTouched,proto3" json:"chunks_touched,omitempty"` - ChunksTouchedSizeSum int64 `protobuf:"varint,16,opt,name=chunks_touched_size_sum,json=chunksTouchedSizeSum,proto3" json:"chunks_touched_size_sum,omitempty"` - ChunksFetched int64 `protobuf:"varint,17,opt,name=chunks_fetched,json=chunksFetched,proto3" json:"chunks_fetched,omitempty"` - ChunksFetchedSizeSum int64 `protobuf:"varint,18,opt,name=chunks_fetched_size_sum,json=chunksFetchedSizeSum,proto3" json:"chunks_fetched_size_sum,omitempty"` - ChunksFetchCount int64 `protobuf:"varint,19,opt,name=chunks_fetch_count,json=chunksFetchCount,proto3" json:"chunks_fetch_count,omitempty"` - DataDownloadedSizeSum int64 `protobuf:"varint,20,opt,name=data_downloaded_size_sum,json=dataDownloadedSizeSum,proto3" json:"data_downloaded_size_sum,omitempty"` + BlocksQueried int64 `protobuf:"varint,1,opt,name=blocks_queried,json=blocksQueried,proto3" json:"blocks_queried,omitempty"` + MergedSeriesCount int64 `protobuf:"varint,2,opt,name=merged_series_count,json=mergedSeriesCount,proto3" json:"merged_series_count,omitempty"` + MergedChunksCount int64 `protobuf:"varint,3,opt,name=merged_chunks_count,json=mergedChunksCount,proto3" json:"merged_chunks_count,omitempty"` + PostingsTouched int64 `protobuf:"varint,4,opt,name=postings_touched,json=postingsTouched,proto3" json:"postings_touched,omitempty"` + PostingsTouchedSizeSum int64 `protobuf:"varint,5,opt,name=postings_touched_size_sum,json=postingsTouchedSizeSum,proto3" json:"postings_touched_size_sum,omitempty"` + PostingsToFetch int64 `protobuf:"varint,6,opt,name=postings_to_fetch,json=postingsToFetch,proto3" json:"postings_to_fetch,omitempty"` + PostingsFetched int64 `protobuf:"varint,7,opt,name=postings_fetched,json=postingsFetched,proto3" json:"postings_fetched,omitempty"` + PostingsFetchedSizeSum int64 `protobuf:"varint,8,opt,name=postings_fetched_size_sum,json=postingsFetchedSizeSum,proto3" json:"postings_fetched_size_sum,omitempty"` + PostingsFetchCount int64 `protobuf:"varint,9,opt,name=postings_fetch_count,json=postingsFetchCount,proto3" json:"postings_fetch_count,omitempty"` + SeriesTouched int64 `protobuf:"varint,10,opt,name=series_touched,json=seriesTouched,proto3" json:"series_touched,omitempty"` + SeriesTouchedSizeSum int64 `protobuf:"varint,11,opt,name=series_touched_size_sum,json=seriesTouchedSizeSum,proto3" json:"series_touched_size_sum,omitempty"` + SeriesFetched int64 `protobuf:"varint,12,opt,name=series_fetched,json=seriesFetched,proto3" json:"series_fetched,omitempty"` + SeriesFetchedSizeSum int64 `protobuf:"varint,13,opt,name=series_fetched_size_sum,json=seriesFetchedSizeSum,proto3" json:"series_fetched_size_sum,omitempty"` + SeriesFetchCount int64 `protobuf:"varint,14,opt,name=series_fetch_count,json=seriesFetchCount,proto3" json:"series_fetch_count,omitempty"` + ChunksTouched int64 `protobuf:"varint,15,opt,name=chunks_touched,json=chunksTouched,proto3" json:"chunks_touched,omitempty"` + ChunksTouchedSizeSum int64 `protobuf:"varint,16,opt,name=chunks_touched_size_sum,json=chunksTouchedSizeSum,proto3" json:"chunks_touched_size_sum,omitempty"` + ChunksFetched int64 `protobuf:"varint,17,opt,name=chunks_fetched,json=chunksFetched,proto3" json:"chunks_fetched,omitempty"` + ChunksFetchedSizeSum int64 `protobuf:"varint,18,opt,name=chunks_fetched_size_sum,json=chunksFetchedSizeSum,proto3" json:"chunks_fetched_size_sum,omitempty"` + ChunksFetchCount int64 `protobuf:"varint,19,opt,name=chunks_fetch_count,json=chunksFetchCount,proto3" json:"chunks_fetch_count,omitempty"` + DataDownloadedSizeSum int64 `protobuf:"varint,20,opt,name=data_downloaded_size_sum,json=dataDownloadedSizeSum,proto3" json:"data_downloaded_size_sum,omitempty"` + GetAllDuration time.Duration `protobuf:"bytes,21,opt,name=get_all_duration,json=getAllDuration,proto3,stdduration" json:"get_all_duration"` + MergeDuration time.Duration `protobuf:"bytes,22,opt,name=merge_duration,json=mergeDuration,proto3,stdduration" json:"merge_duration"` } func (m *QueryStats) Reset() { *m = QueryStats{} } @@ -370,48 +377,53 @@ func init() { func init() { proto.RegisterFile("store/hintspb/hints.proto", fileDescriptor_b82aa23c4c11e83f) } var fileDescriptor_b82aa23c4c11e83f = []byte{ - // 652 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x4f, 0x13, 0x41, - 0x1c, 0xed, 0x52, 0x3e, 0x7f, 0x95, 0x52, 0xa6, 0x15, 0x16, 0x0e, 0x2b, 0x69, 0x42, 0x82, 0x86, - 0x14, 0x83, 0x31, 0x46, 0x3d, 0x09, 0x86, 0x78, 0x50, 0x13, 0x5a, 0x83, 0x89, 0x9a, 0x4c, 0xf6, - 0x63, 0xec, 0x6e, 0x68, 0x77, 0x96, 0x9d, 0xd9, 0x18, 0xb8, 0x7b, 0x35, 0xfe, 0x59, 0xc4, 0x13, - 0x47, 0x4f, 0x46, 0xe1, 0x1f, 0x31, 0x3b, 0x1f, 0xec, 0x4c, 0xb9, 0xf6, 0x02, 0xcd, 0xfb, 0xbd, - 0xf7, 0xe6, 0xbd, 0xdf, 0x4c, 0xb2, 0xb0, 0xc1, 0x38, 0xcd, 0xc9, 0x5e, 0x9c, 0xa4, 0x9c, 0x65, - 0x81, 0xfc, 0xdf, 0xcb, 0x72, 0xca, 0x29, 0x5a, 0x50, 0xe0, 0x66, 0x67, 0x48, 0x87, 0x54, 0x60, - 0x7b, 0xe5, 0x2f, 0x39, 0xde, 0x54, 0x4a, 0xf1, 0x37, 0x0b, 0xf6, 0xf8, 0x79, 0x46, 0x94, 0xb2, - 0xfb, 0xdd, 0x01, 0x34, 0x20, 0x79, 0x42, 0x58, 0x9f, 0x9c, 0x15, 0x84, 0xf1, 0x37, 0xa5, 0x13, - 0x7a, 0x05, 0xcd, 0x60, 0x44, 0xc3, 0x53, 0x3c, 0xf6, 0x79, 0x18, 0x93, 0x9c, 0xb9, 0xce, 0x56, - 0x7d, 0xa7, 0xb1, 0xdf, 0xe9, 0xf1, 0xd8, 0x4f, 0x29, 0xeb, 0xbd, 0xf5, 0x03, 0x32, 0x7a, 0x27, - 0x87, 0x07, 0xb3, 0x97, 0x7f, 0x1e, 0xd4, 0xfa, 0xcb, 0x42, 0xa1, 0x30, 0x86, 0x76, 0x01, 0x91, - 0xd4, 0x0f, 0x46, 0x04, 0x9f, 0x15, 0x24, 0x3f, 0xc7, 0x8c, 0xfb, 0x9c, 0xb9, 0x33, 0x5b, 0xce, - 0xce, 0x62, 0xbf, 0x25, 0x27, 0xc7, 0xe5, 0x60, 0x50, 0xe2, 0xdd, 0x1f, 0x0e, 0xb4, 0x75, 0x0e, - 0x96, 0xd1, 0x94, 0x11, 0x19, 0xe4, 0x25, 0x34, 0x4b, 0x79, 0x42, 0x22, 0x2c, 0xec, 0x75, 0x90, - 0x66, 0x4f, 0x55, 0xee, 0x1d, 0x94, 0xb0, 0x8e, 0xa0, 0xb8, 0x02, 0x63, 0xe8, 0x05, 0x34, 0x26, - 0xcf, 0x6e, 0xec, 0xb7, 0x6f, 0x95, 0xd5, 0xf1, 0x42, 0xee, 0xf4, 0xe1, 0xac, 0x0a, 0xb4, 0x0e, - 0x73, 0xc2, 0x05, 0x35, 0x61, 0x26, 0x89, 0x5c, 0x67, 0xcb, 0xd9, 0x59, 0xea, 0xcf, 0x24, 0x51, - 0xf7, 0x33, 0xac, 0x89, 0xf2, 0xef, 0xfd, 0xf1, 0xd4, 0x97, 0xd6, 0x3d, 0x81, 0x75, 0xd3, 0x7c, - 0x5a, 0x9b, 0xe8, 0x7e, 0x51, 0xbe, 0x27, 0xfe, 0xa8, 0x98, 0x7e, 0xea, 0x8f, 0xe0, 0x5a, 0xee, - 0x53, 0x8b, 0xfd, 0x6b, 0x01, 0xa0, 0xba, 0x25, 0xb4, 0xad, 0xa2, 0x32, 0xac, 0x68, 0xe2, 0x5a, - 0xea, 0x2a, 0x0e, 0x3b, 0x96, 0x20, 0xea, 0x41, 0x7b, 0x4c, 0xf2, 0x21, 0x89, 0x30, 0x13, 0x2f, - 0x0a, 0x87, 0xb4, 0x48, 0xb9, 0xb8, 0xfe, 0x7a, 0x7f, 0x55, 0x8e, 0xe4, 0x5b, 0x3b, 0x2c, 0x07, - 0x06, 0x3f, 0x8c, 0x8b, 0xf4, 0x54, 0xf3, 0xeb, 0x26, 0xff, 0x50, 0x4c, 0x24, 0xff, 0x21, 0xb4, - 0x32, 0xca, 0x78, 0x92, 0x0e, 0x19, 0xe6, 0xb4, 0x08, 0x63, 0x12, 0xb9, 0xb3, 0x82, 0xbc, 0xa2, - 0xf1, 0x0f, 0x12, 0x46, 0xcf, 0x61, 0x63, 0x92, 0x8a, 0x59, 0x72, 0x41, 0x30, 0x2b, 0xc6, 0xee, - 0x9c, 0xd0, 0xac, 0x4d, 0x68, 0x06, 0xc9, 0x05, 0x19, 0x14, 0x63, 0xf4, 0x08, 0x56, 0x0d, 0x29, - 0xfe, 0x4a, 0x78, 0x18, 0xbb, 0xf3, 0x93, 0xc7, 0x1c, 0x95, 0xb0, 0x95, 0x48, 0x10, 0x49, 0xe4, - 0x2e, 0xd8, 0xd4, 0x23, 0x09, 0x5b, 0x89, 0x14, 0xb5, 0x4a, 0xb4, 0x68, 0x27, 0x52, 0x1a, 0x9d, - 0xe8, 0x31, 0x74, 0x6c, 0xa9, 0x5a, 0xd4, 0x92, 0x50, 0x21, 0x4b, 0x25, 0x37, 0xb5, 0x0d, 0x4d, - 0x75, 0x05, 0x7a, 0x4f, 0x20, 0x2f, 0x4c, 0xa2, 0x7a, 0x4b, 0x4f, 0x61, 0xdd, 0xa6, 0x55, 0x89, - 0x1a, 0x82, 0xdf, 0xb1, 0xf8, 0x3a, 0x4f, 0xe5, 0xae, 0x3b, 0xdf, 0x33, 0xdd, 0x75, 0xe3, 0xca, - 0xfd, 0x4e, 0xdf, 0x65, 0xd3, 0x7d, 0xa2, 0xed, 0x2e, 0x20, 0x53, 0xa6, 0xba, 0x36, 0x85, 0xa2, - 0x65, 0x28, 0x6e, 0x9b, 0xaa, 0xc7, 0xa3, 0x9b, 0xae, 0xc8, 0x2c, 0x12, 0x35, 0x9a, 0xda, 0xb4, - 0x2a, 0x4b, 0x4b, 0x66, 0xb1, 0xf8, 0x46, 0x53, 0x25, 0xd3, 0x4d, 0x57, 0x4d, 0x77, 0xa3, 0xa9, - 0x4d, 0xab, 0xdc, 0x91, 0xe9, 0x7e, 0xb7, 0xa9, 0x29, 0x53, 0x4d, 0xdb, 0xb2, 0xa9, 0xa1, 0x90, - 0x4d, 0x9f, 0x81, 0x1b, 0xf9, 0xdc, 0xc7, 0x11, 0xfd, 0x96, 0x8e, 0xa8, 0x1f, 0x99, 0xa7, 0x74, - 0x84, 0xe6, 0x7e, 0x39, 0x7f, 0x7d, 0x3b, 0x56, 0xc7, 0x1c, 0x6c, 0x5f, 0xfe, 0xf3, 0x6a, 0x97, - 0xd7, 0x9e, 0x73, 0x75, 0xed, 0x39, 0x7f, 0xaf, 0x3d, 0xe7, 0xe7, 0x8d, 0x57, 0xbb, 0xba, 0xf1, - 0x6a, 0xbf, 0x6f, 0xbc, 0xda, 0x27, 0xfd, 0x09, 0x0b, 0xe6, 0xc5, 0x87, 0xe9, 0xc9, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x4e, 0x26, 0x0a, 0x60, 0xef, 0x06, 0x00, 0x00, + // 731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x4f, 0xdb, 0x30, + 0x1c, 0x6d, 0x28, 0x1f, 0xc5, 0x1d, 0xa1, 0xb8, 0x05, 0x02, 0x87, 0x80, 0x2a, 0x21, 0xb1, 0x09, + 0xa5, 0x13, 0xd3, 0x34, 0x6d, 0x3b, 0xf1, 0x21, 0x34, 0x4d, 0x63, 0x12, 0xe9, 0xc4, 0xa4, 0x6d, + 0x92, 0x95, 0x34, 0x26, 0x8d, 0x48, 0xe3, 0x12, 0x3b, 0x9a, 0xe0, 0xbe, 0xeb, 0xb4, 0xe3, 0xfe, + 0x24, 0x8e, 0x1c, 0x77, 0xda, 0x07, 0x68, 0xff, 0xc7, 0x14, 0x7f, 0x34, 0x4e, 0xb9, 0xec, 0xd0, + 0x0b, 0xb4, 0xef, 0xf7, 0xde, 0xf3, 0x7b, 0x76, 0x1a, 0x83, 0x35, 0xca, 0x48, 0x8a, 0x3b, 0xfd, + 0x28, 0x61, 0x74, 0xe8, 0x8b, 0xff, 0xce, 0x30, 0x25, 0x8c, 0xc0, 0x39, 0x09, 0xae, 0xb7, 0x42, + 0x12, 0x12, 0x8e, 0x75, 0xf2, 0x4f, 0x62, 0xbc, 0x6e, 0x87, 0x84, 0x84, 0x31, 0xee, 0xf0, 0x6f, + 0x7e, 0x76, 0xd6, 0x09, 0xb2, 0xd4, 0x63, 0x11, 0x49, 0xe4, 0x5c, 0x3a, 0xf3, 0xbf, 0x43, 0xbf, + 0xc3, 0x2e, 0x87, 0x58, 0x3a, 0xb7, 0xbf, 0x18, 0x00, 0x76, 0x71, 0x1a, 0x61, 0xea, 0xe2, 0x8b, + 0x0c, 0x53, 0xf6, 0x2a, 0x5f, 0x09, 0xee, 0x01, 0xd3, 0x8f, 0x49, 0xef, 0x1c, 0x0d, 0x3c, 0xd6, + 0xeb, 0xe3, 0x94, 0x5a, 0xc6, 0x66, 0x75, 0xbb, 0xbe, 0xdb, 0x72, 0x58, 0xdf, 0x4b, 0x08, 0x75, + 0xde, 0x78, 0x3e, 0x8e, 0x8f, 0xc5, 0x70, 0x7f, 0xfa, 0xfa, 0xe7, 0x46, 0xc5, 0x5d, 0xe0, 0x0a, + 0x89, 0x51, 0xb8, 0x03, 0x20, 0x4e, 0x3c, 0x3f, 0xc6, 0xe8, 0x22, 0xc3, 0xe9, 0x25, 0xa2, 0xcc, + 0x63, 0xd4, 0x9a, 0xda, 0x34, 0xb6, 0x6b, 0x6e, 0x43, 0x4c, 0x4e, 0xf2, 0x41, 0x37, 0xc7, 0xdb, + 0x5f, 0x0d, 0xd0, 0x54, 0x39, 0xe8, 0x90, 0x24, 0x14, 0x8b, 0x20, 0x2f, 0x81, 0x99, 0xcb, 0x23, + 0x1c, 0x20, 0x6e, 0xaf, 0x82, 0x98, 0x8e, 0xdc, 0x12, 0x67, 0x3f, 0x87, 0x55, 0x04, 0xc9, 0xe5, + 0x18, 0x85, 0x2f, 0x40, 0x7d, 0x7c, 0xed, 0xfa, 0x6e, 0x73, 0xa4, 0x2c, 0x96, 0xe7, 0x72, 0xc3, + 0x05, 0x17, 0x45, 0xa0, 0x55, 0x30, 0xc3, 0x5d, 0xa0, 0x09, 0xa6, 0xa2, 0xc0, 0x32, 0x36, 0x8d, + 0xed, 0x79, 0x77, 0x2a, 0x0a, 0xda, 0x1f, 0xc1, 0x0a, 0x2f, 0xff, 0xd6, 0x1b, 0x4c, 0x7c, 0xd3, + 0xda, 0xa7, 0x60, 0x55, 0x37, 0x9f, 0xd4, 0x4e, 0xb4, 0x3f, 0x49, 0xdf, 0x53, 0x2f, 0xce, 0x26, + 0x9f, 0xfa, 0x3d, 0xb0, 0x4a, 0xee, 0x13, 0x8b, 0xfd, 0xb7, 0x06, 0x40, 0x71, 0x4a, 0x70, 0x4b, + 0x46, 0xa5, 0x48, 0xd2, 0xf8, 0xb1, 0x54, 0x65, 0x1c, 0x7a, 0x22, 0x40, 0xe8, 0x80, 0xe6, 0x00, + 0xa7, 0x21, 0x0e, 0x10, 0xe5, 0x4f, 0x14, 0xea, 0x91, 0x2c, 0x61, 0xfc, 0xf8, 0xab, 0xee, 0x92, + 0x18, 0x89, 0x67, 0xed, 0x20, 0x1f, 0x68, 0xfc, 0x5e, 0x3f, 0x4b, 0xce, 0x15, 0xbf, 0xaa, 0xf3, + 0x0f, 0xf8, 0x44, 0xf0, 0x1f, 0x82, 0xc6, 0x90, 0x50, 0x16, 0x25, 0x21, 0x45, 0x8c, 0x64, 0xbd, + 0x3e, 0x0e, 0xac, 0x69, 0x4e, 0x5e, 0x54, 0xf8, 0x3b, 0x01, 0xc3, 0xe7, 0x60, 0x6d, 0x9c, 0x8a, + 0x68, 0x74, 0x85, 0x11, 0xcd, 0x06, 0xd6, 0x0c, 0xd7, 0xac, 0x8c, 0x69, 0xba, 0xd1, 0x15, 0xee, + 0x66, 0x03, 0xf8, 0x08, 0x2c, 0x69, 0x52, 0x74, 0x86, 0x59, 0xaf, 0x6f, 0xcd, 0x8e, 0x2f, 0x73, + 0x94, 0xc3, 0xa5, 0x44, 0x9c, 0x88, 0x03, 0x6b, 0xae, 0x4c, 0x3d, 0x12, 0x70, 0x29, 0x91, 0xa4, + 0x16, 0x89, 0x6a, 0xe5, 0x44, 0x52, 0xa3, 0x12, 0x3d, 0x06, 0xad, 0xb2, 0x54, 0x6e, 0xd4, 0x3c, + 0x57, 0xc1, 0x92, 0x4a, 0xec, 0xd4, 0x16, 0x30, 0xe5, 0x11, 0xa8, 0x7d, 0x02, 0xe2, 0xc0, 0x04, + 0xaa, 0x76, 0xe9, 0x29, 0x58, 0x2d, 0xd3, 0x8a, 0x44, 0x75, 0xce, 0x6f, 0x95, 0xf8, 0x2a, 0x4f, + 0xe1, 0xae, 0x3a, 0x3f, 0xd0, 0xdd, 0x55, 0xe3, 0xc2, 0xfd, 0x5e, 0xdf, 0x05, 0xdd, 0x7d, 0xac, + 0xed, 0x0e, 0x80, 0xba, 0x4c, 0x76, 0x35, 0xb9, 0xa2, 0xa1, 0x29, 0x46, 0x4d, 0xe5, 0xc3, 0xa3, + 0x9a, 0x2e, 0x8a, 0x2c, 0x02, 0xd5, 0x9a, 0x96, 0x69, 0x45, 0x96, 0x86, 0xc8, 0x52, 0xe2, 0x6b, + 0x4d, 0xa5, 0x4c, 0x35, 0x5d, 0xd2, 0xdd, 0xb5, 0xa6, 0x65, 0x5a, 0xe1, 0x0e, 0x75, 0xf7, 0xfb, + 0x4d, 0x75, 0x99, 0x6c, 0xda, 0x14, 0x4d, 0x35, 0x85, 0x68, 0xfa, 0x0c, 0x58, 0x81, 0xc7, 0x3c, + 0x14, 0x90, 0xcf, 0x49, 0x4c, 0xbc, 0x40, 0x5f, 0xa5, 0xc5, 0x35, 0xcb, 0xf9, 0xfc, 0x70, 0x34, + 0x56, 0xcb, 0x1c, 0x83, 0x46, 0x88, 0x19, 0xf2, 0xe2, 0x18, 0xa9, 0xfb, 0xc9, 0x5a, 0xe6, 0xaf, + 0xe4, 0x35, 0x47, 0x5c, 0x60, 0x8e, 0xba, 0xc0, 0x9c, 0x43, 0x49, 0xd8, 0xaf, 0xe5, 0xaf, 0x85, + 0xef, 0xbf, 0x36, 0x0c, 0xd7, 0x0c, 0x31, 0xdb, 0x8b, 0x63, 0x35, 0x81, 0xaf, 0x81, 0xc9, 0x7f, + 0x9a, 0x85, 0xd9, 0xca, 0xff, 0x9b, 0x2d, 0x70, 0xe9, 0x68, 0xb0, 0x75, 0xfd, 0xc7, 0xae, 0x5c, + 0xdf, 0xda, 0xc6, 0xcd, 0xad, 0x6d, 0xfc, 0xbe, 0xb5, 0x8d, 0x6f, 0x77, 0x76, 0xe5, 0xe6, 0xce, + 0xae, 0xfc, 0xb8, 0xb3, 0x2b, 0x1f, 0xd4, 0xed, 0xeb, 0xcf, 0x72, 0xcb, 0x27, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x49, 0xb6, 0x83, 0x90, 0xaa, 0x07, 0x00, 0x00, } func (m *SeriesRequestHints) Marshal() (dAtA []byte, err error) { @@ -708,6 +720,26 @@ func (m *QueryStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MergeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MergeDuration):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintHints(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.GetAllDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.GetAllDuration):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintHints(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa if m.DataDownloadedSizeSum != 0 { i = encodeVarintHints(dAtA, i, uint64(m.DataDownloadedSizeSum)) i-- @@ -1008,6 +1040,10 @@ func (m *QueryStats) Size() (n int) { if m.DataDownloadedSizeSum != 0 { n += 2 + sovHints(uint64(m.DataDownloadedSizeSum)) } + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.GetAllDuration) + n += 2 + l + sovHints(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MergeDuration) + n += 2 + l + sovHints(uint64(l)) return n } @@ -2068,6 +2104,72 @@ func (m *QueryStats) Unmarshal(dAtA []byte) error { break } } + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetAllDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHints + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHints + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHints + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.GetAllDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MergeDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHints + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHints + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHints + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MergeDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHints(dAtA[iNdEx:]) diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.proto b/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.proto index aeb3ac11d1..69c60d2a7d 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.proto +++ b/vendor/github.com/thanos-io/thanos/pkg/store/hintspb/hints.proto @@ -5,6 +5,7 @@ syntax = "proto3"; package hintspb; import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; import "store/storepb/types.proto"; option go_package = "hintspb"; @@ -90,4 +91,6 @@ message QueryStats { int64 chunks_fetch_count = 19; int64 data_downloaded_size_sum = 20; + google.protobuf.Duration get_all_duration = 21 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration merge_duration = 22 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; } \ No newline at end of file diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go b/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go index 244ae5592d..fd6d4c0195 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go @@ -42,7 +42,6 @@ import ( "github.com/thanos-io/thanos/pkg/store/labelpb" "github.com/thanos-io/thanos/pkg/store/storepb" "github.com/thanos-io/thanos/pkg/store/storepb/prompb" - "github.com/thanos-io/thanos/pkg/stringset" "github.com/thanos-io/thanos/pkg/tracing" ) @@ -54,7 +53,6 @@ type PrometheusStore struct { buffers sync.Pool component component.StoreAPI externalLabelsFn func() labels.Labels - labelNamesSet func() stringset.Set promVersion func() string timestamps func() (mint int64, maxt int64) @@ -81,7 +79,6 @@ func NewPrometheusStore( component component.StoreAPI, externalLabelsFn func() labels.Labels, timestamps func() (mint int64, maxt int64), - labelNamesSet func() stringset.Set, promVersion func() string, ) (*PrometheusStore, error) { if logger == nil { @@ -95,7 +92,6 @@ func NewPrometheusStore( externalLabelsFn: externalLabelsFn, promVersion: promVersion, timestamps: timestamps, - labelNamesSet: labelNamesSet, remoteReadAcceptableResponses: []prompb.ReadRequest_ResponseType{prompb.ReadRequest_STREAMED_XOR_CHUNKS, prompb.ReadRequest_SAMPLES}, buffers: sync.Pool{New: func() interface{} { b := make([]byte, 0, initialBufSize) @@ -149,7 +145,8 @@ func (p *PrometheusStore) putBuffer(b *[]byte) { // Series returns all series for a requested time range and label matcher. func (p *PrometheusStore) Series(r *storepb.SeriesRequest, seriesSrv storepb.Store_SeriesServer) error { - s := newFlushableServer(seriesSrv, p.labelNamesSet(), r.WithoutReplicaLabels) + s := newFlushableServer(seriesSrv, sortingStrategyStore) + extLset := p.externalLabelsFn() match, matchers, err := matchesExternalLabels(r.Matchers, extLset) diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/proxy_heap.go b/vendor/github.com/thanos-io/thanos/pkg/store/proxy_heap.go index 7ea18b134d..51631b388a 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/proxy_heap.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/proxy_heap.go @@ -164,9 +164,7 @@ func (d *dedupResponseHeap) At() *storepb.SeriesResponse { // tournament trees need n-1 auxiliary nodes so there // might not be much of a difference. type ProxyResponseHeap struct { - nodes []ProxyResponseHeapNode - iLblsScratch labels.Labels - jLblsScratch labels.Labels + nodes []ProxyResponseHeapNode } func (h *ProxyResponseHeap) Less(i, j int) bool { @@ -174,26 +172,10 @@ func (h *ProxyResponseHeap) Less(i, j int) bool { jResp := h.nodes[j].rs.At() if iResp.GetSeries() != nil && jResp.GetSeries() != nil { - // Response sets are sorted before adding external labels. - // This comparison excludes those labels to keep the same order. - iStoreLbls := h.nodes[i].rs.StoreLabels() - jStoreLbls := h.nodes[j].rs.StoreLabels() - iLbls := labelpb.ZLabelsToPromLabels(iResp.GetSeries().Labels) jLbls := labelpb.ZLabelsToPromLabels(jResp.GetSeries().Labels) - copyLabels(&h.iLblsScratch, iLbls) - copyLabels(&h.jLblsScratch, jLbls) - - var iExtLbls, jExtLbls labels.Labels - h.iLblsScratch, iExtLbls = dropLabels(h.iLblsScratch, iStoreLbls) - h.jLblsScratch, jExtLbls = dropLabels(h.jLblsScratch, jStoreLbls) - - c := labels.Compare(h.iLblsScratch, h.jLblsScratch) - if c != 0 { - return c < 0 - } - return labels.Compare(iExtLbls, jExtLbls) < 0 + return labels.Compare(iLbls, jLbls) < 0 } else if iResp.GetSeries() == nil && jResp.GetSeries() != nil { return true } else if iResp.GetSeries() != nil && jResp.GetSeries() == nil { @@ -774,9 +756,9 @@ func newEagerRespSet( // This should be used only for stores that does not support doing this on server side. // See docs/proposals-accepted/20221129-avoid-global-sort.md for details. - if len(l.removeLabels) > 0 { - sortWithoutLabels(l.bufferedResponses, l.removeLabels) - } + // NOTE. Client is not guaranteed to give a sorted response when extLset is added + // Generally we need to resort here. + sortWithoutLabels(l.bufferedResponses, l.removeLabels) }(ret) @@ -794,34 +776,6 @@ func rmLabels(l labels.Labels, labelsToRemove map[string]struct{}) labels.Labels return l } -// dropLabels removes labels from the given label set and returns the removed labels. -func dropLabels(l labels.Labels, labelsToDrop map[string]struct{}) (labels.Labels, labels.Labels) { - cutoff := len(l) - for i := 0; i < len(l); i++ { - if i == cutoff { - break - } - if _, ok := labelsToDrop[l[i].Name]; !ok { - continue - } - - lbl := l[i] - l = append(append(l[:i], l[i+1:]...), lbl) - cutoff-- - i-- - } - - return l[:cutoff], l[cutoff:] -} - -func copyLabels(dest *labels.Labels, src labels.Labels) { - if len(*dest) < cap(src) { - *dest = make([]labels.Label, len(src)) - } - *dest = (*dest)[:len(src)] - copy(*dest, src) -} - // sortWithoutLabels removes given labels from series and re-sorts the series responses that the same // series with different labels are coming right after each other. Other types of responses are moved to front. func sortWithoutLabels(set []*storepb.SeriesResponse, labelsToRemove map[string]struct{}) { @@ -831,7 +785,9 @@ func sortWithoutLabels(set []*storepb.SeriesResponse, labelsToRemove map[string] continue } - ser.Labels = labelpb.ZLabelsFromPromLabels(rmLabels(labelpb.ZLabelsToPromLabels(ser.Labels), labelsToRemove)) + if len(labelsToRemove) > 0 { + ser.Labels = labelpb.ZLabelsFromPromLabels(rmLabels(labelpb.ZLabelsToPromLabels(ser.Labels), labelsToRemove)) + } } // With the re-ordered label sets, re-sorting all series aligns the same series diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/tsdb.go b/vendor/github.com/thanos-io/thanos/pkg/store/tsdb.go index 73604b9236..b5182f3008 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/tsdb.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/tsdb.go @@ -13,7 +13,6 @@ import ( "sync" "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" @@ -26,7 +25,6 @@ import ( "github.com/thanos-io/thanos/pkg/runutil" "github.com/thanos-io/thanos/pkg/store/labelpb" "github.com/thanos-io/thanos/pkg/store/storepb" - "github.com/thanos-io/thanos/pkg/stringset" ) const RemoteReadFrameLimit = 1048576 @@ -46,9 +44,6 @@ type TSDBStore struct { buffers sync.Pool maxBytesPerFrame int - lmx sync.RWMutex - labelNamesSet stringset.Set - extLset labels.Labels mtx sync.RWMutex } @@ -77,7 +72,6 @@ func NewTSDBStore(logger log.Logger, db TSDBReader, component component.StoreAPI component: component, extLset: extLset, maxBytesPerFrame: RemoteReadFrameLimit, - labelNamesSet: stringset.AllStrings(), buffers: sync.Pool{New: func() interface{} { b := make([]byte, 0, initialBufSize) return &b @@ -175,7 +169,7 @@ type CloseDelegator interface { // Series returns all series for a requested time range and label matcher. The returned data may // exceed the requested time bounds. func (s *TSDBStore) Series(r *storepb.SeriesRequest, seriesSrv storepb.Store_SeriesServer) error { - srv := newFlushableServer(seriesSrv, s.LabelNamesSet(), r.WithoutReplicaLabels) + srv := newFlushableServer(seriesSrv, sortingStrategyStore) match, matchers, err := matchesExternalLabels(r.Matchers, s.getExtLset()) if err != nil { @@ -376,38 +370,3 @@ func (s *TSDBStore) LabelValues(ctx context.Context, r *storepb.LabelValuesReque return &storepb.LabelValuesResponse{Values: values}, nil } - -func (s *TSDBStore) UpdateLabelNames(ctx context.Context) { - newSet := stringset.New() - q, err := s.db.ChunkQuerier(ctx, math.MinInt64, math.MaxInt64) - if err != nil { - level.Warn(s.logger).Log("msg", "error creating tsdb querier", "err", err.Error()) - s.setLabelNamesSet(stringset.AllStrings()) - return - } - defer runutil.CloseWithLogOnErr(s.logger, q, "close tsdb querier label names") - - res, _, err := q.LabelNames() - if err != nil { - level.Warn(s.logger).Log("msg", "error getting label names", "err", err.Error()) - s.setLabelNamesSet(stringset.AllStrings()) - return - } - for _, l := range res { - newSet.Insert(l) - } - s.setLabelNamesSet(newSet) -} - -func (s *TSDBStore) setLabelNamesSet(newSet stringset.Set) { - s.lmx.Lock() - s.labelNamesSet = newSet - s.lmx.Unlock() -} - -func (b *TSDBStore) LabelNamesSet() stringset.Set { - b.lmx.RLock() - defer b.lmx.RUnlock() - - return b.labelNamesSet -} diff --git a/vendor/github.com/thanos-io/thanos/pkg/stringset/set.go b/vendor/github.com/thanos-io/thanos/pkg/stringset/set.go deleted file mode 100644 index 080071570f..0000000000 --- a/vendor/github.com/thanos-io/thanos/pkg/stringset/set.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) The Thanos Authors. -// Licensed under the Apache License 2.0. - -package stringset - -import ( - cuckoo "github.com/seiflotfy/cuckoofilter" -) - -type Set interface { - Has(string) bool - HasAny([]string) bool - // Count returns the number of elements in the set. - // A value of -1 indicates infinite size and can be returned by a - // set representing all possible string values. - Count() int -} - -type fixedSet struct { - cuckoo *cuckoo.Filter -} - -func (f fixedSet) HasAny(strings []string) bool { - for _, s := range strings { - if f.Has(s) { - return true - } - } - return false -} - -func NewFromStrings(items ...string) Set { - f := cuckoo.NewFilter(uint(len(items))) - for _, label := range items { - f.InsertUnique([]byte(label)) - } - - return &fixedSet{cuckoo: f} -} - -func (f fixedSet) Has(s string) bool { - return f.cuckoo.Lookup([]byte(s)) -} - -func (f fixedSet) Count() int { - return int(f.cuckoo.Count()) -} - -type mutableSet struct { - cuckoo *cuckoo.ScalableCuckooFilter -} - -type MutableSet interface { - Set - Insert(string) -} - -func New() MutableSet { - return &mutableSet{ - cuckoo: cuckoo.NewScalableCuckooFilter(), - } -} - -func (e mutableSet) Insert(s string) { - e.cuckoo.InsertUnique([]byte(s)) -} - -func (e mutableSet) Has(s string) bool { - return e.cuckoo.Lookup([]byte(s)) -} - -func (e mutableSet) HasAny(strings []string) bool { - for _, s := range strings { - if e.Has(s) { - return true - } - } - return false -} - -func (e mutableSet) Count() int { - return int(e.cuckoo.Count()) -} - -type allStringsSet struct{} - -func (e allStringsSet) HasAny(_ []string) bool { - return true -} - -func AllStrings() *allStringsSet { - return &allStringsSet{} -} - -func (e allStringsSet) Has(_ string) bool { - return true -} - -func (e allStringsSet) Count() int { - return -1 -} diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go index 83f112c4c8..4756ad5f79 100644 --- a/vendor/golang.org/x/sys/cpu/cpu.go +++ b/vendor/golang.org/x/sys/cpu/cpu.go @@ -38,7 +38,7 @@ var X86 struct { HasAVX512F bool // Advanced vector extension 512 Foundation Instructions HasAVX512CD bool // Advanced vector extension 512 Conflict Detection Instructions HasAVX512ER bool // Advanced vector extension 512 Exponential and Reciprocal Instructions - HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions Instructions + HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions HasAVX512VL bool // Advanced vector extension 512 Vector Length Extensions HasAVX512BW bool // Advanced vector extension 512 Byte and Word Instructions HasAVX512DQ bool // Advanced vector extension 512 Doubleword and Quadword Instructions @@ -54,6 +54,9 @@ var X86 struct { HasAVX512VBMI2 bool // Advanced vector extension 512 Vector Byte Manipulation Instructions 2 HasAVX512BITALG bool // Advanced vector extension 512 Bit Algorithms HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions + HasAMXTile bool // Advanced Matrix Extension Tile instructions + HasAMXInt8 bool // Advanced Matrix Extension Int8 instructions + HasAMXBF16 bool // Advanced Matrix Extension BFloat16 instructions HasBMI1 bool // Bit manipulation instruction set 1 HasBMI2 bool // Bit manipulation instruction set 2 HasCX16 bool // Compare and exchange 16 Bytes diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go index f5aacfc825..2dcde8285d 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go @@ -37,6 +37,9 @@ func initOptions() { {Name: "avx512vbmi2", Feature: &X86.HasAVX512VBMI2}, {Name: "avx512bitalg", Feature: &X86.HasAVX512BITALG}, {Name: "avx512bf16", Feature: &X86.HasAVX512BF16}, + {Name: "amxtile", Feature: &X86.HasAMXTile}, + {Name: "amxint8", Feature: &X86.HasAMXInt8}, + {Name: "amxbf16", Feature: &X86.HasAMXBF16}, {Name: "bmi1", Feature: &X86.HasBMI1}, {Name: "bmi2", Feature: &X86.HasBMI2}, {Name: "cx16", Feature: &X86.HasCX16}, @@ -138,6 +141,10 @@ func archInit() { eax71, _, _, _ := cpuid(7, 1) X86.HasAVX512BF16 = isSet(5, eax71) } + + X86.HasAMXTile = isSet(24, edx7) + X86.HasAMXInt8 = isSet(25, edx7) + X86.HasAMXBF16 = isSet(22, edx7) } func isSet(bitpos uint, value uint32) bool { diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 8f775fafa6..47fa6a7ebd 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -583,6 +583,7 @@ ccflags="$@" $2 ~ /^PERF_/ || $2 ~ /^SECCOMP_MODE_/ || $2 ~ /^SEEK_/ || + $2 ~ /^SCHED_/ || $2 ~ /^SPLICE_/ || $2 ~ /^SYNC_FILE_RANGE_/ || $2 !~ /IOC_MAGIC/ && diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index a730878e49..0ba030197f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -2471,6 +2471,29 @@ func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask * return pselect6(nfd, r, w, e, mutableTimeout, kernelMask) } +//sys schedSetattr(pid int, attr *SchedAttr, flags uint) (err error) +//sys schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) + +// SchedSetAttr is a wrapper for sched_setattr(2) syscall. +// https://man7.org/linux/man-pages/man2/sched_setattr.2.html +func SchedSetAttr(pid int, attr *SchedAttr, flags uint) error { + if attr == nil { + return EINVAL + } + attr.Size = SizeofSchedAttr + return schedSetattr(pid, attr, flags) +} + +// SchedGetAttr is a wrapper for sched_getattr(2) syscall. +// https://man7.org/linux/man-pages/man2/sched_getattr.2.html +func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { + attr := &SchedAttr{} + if err := schedGetattr(pid, attr, SizeofSchedAttr, flags); err != nil { + return nil, err + } + return attr, nil +} + /* * Unimplemented */ diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 8bb30e7ce3..f6eda27050 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -549,6 +549,9 @@ func SetNonblock(fd int, nonblocking bool) (err error) { if err != nil { return err } + if (flag&O_NONBLOCK != 0) == nonblocking { + return nil + } if nonblocking { flag |= O_NONBLOCK } else { diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 3784f402e5..0787a043be 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -2821,6 +2821,23 @@ const ( RWF_SUPPORTED = 0x1f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 + SCHED_BATCH = 0x3 + SCHED_DEADLINE = 0x6 + SCHED_FIFO = 0x1 + SCHED_FLAG_ALL = 0x7f + SCHED_FLAG_DL_OVERRUN = 0x4 + SCHED_FLAG_KEEP_ALL = 0x18 + SCHED_FLAG_KEEP_PARAMS = 0x10 + SCHED_FLAG_KEEP_POLICY = 0x8 + SCHED_FLAG_RECLAIM = 0x2 + SCHED_FLAG_RESET_ON_FORK = 0x1 + SCHED_FLAG_UTIL_CLAMP = 0x60 + SCHED_FLAG_UTIL_CLAMP_MAX = 0x40 + SCHED_FLAG_UTIL_CLAMP_MIN = 0x20 + SCHED_IDLE = 0x5 + SCHED_NORMAL = 0x0 + SCHED_RESET_ON_FORK = 0x40000000 + SCHED_RR = 0x2 SCM_CREDENTIALS = 0x2 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index a07321bed9..14ab34a565 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -2197,3 +2197,23 @@ func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { RawSyscallNoError(SYS_GETRESGID, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func schedSetattr(pid int, attr *SchedAttr, flags uint) (err error) { + _, _, e1 := Syscall(SYS_SCHED_SETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) { + _, _, e1 := Syscall6(SYS_SCHED_GETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(size), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 26ef52aafc..494493c78c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -5868,3 +5868,18 @@ const ( VIRTIO_NET_HDR_GSO_UDP_L4 = 0x5 VIRTIO_NET_HDR_GSO_ECN = 0x80 ) + +type SchedAttr struct { + Size uint32 + Policy uint32 + Flags uint64 + Nice int32 + Priority uint32 + Runtime uint64 + Deadline uint64 + Period uint64 + Util_min uint32 + Util_max uint32 +} + +const SizeofSchedAttr = 0x38 diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 373d16388a..67bad0926a 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -216,7 +216,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath //sys TerminateProcess(handle Handle, exitcode uint32) (err error) //sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) -//sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW +//sys getStartupInfo(startupInfo *StartupInfo) = GetStartupInfoW //sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) //sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) //sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] @@ -437,6 +437,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute //sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute +// Windows Multimedia API +//sys TimeBeginPeriod (period uint32) (err error) [failretval != 0] = winmm.timeBeginPeriod +//sys TimeEndPeriod (period uint32) (err error) [failretval != 0] = winmm.timeEndPeriod + // syscall interface implementation for other packages // GetCurrentProcess returns the handle for the current process. @@ -1624,6 +1628,11 @@ func SetConsoleCursorPosition(console Handle, position Coord) error { return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position)))) } +func GetStartupInfo(startupInfo *StartupInfo) error { + getStartupInfo(startupInfo) + return nil +} + func (s NTStatus) Errno() syscall.Errno { return rtlNtStatusToDosErrorNoTeb(s) } diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 566dd3e315..5c385580f6 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -55,6 +55,7 @@ var ( moduser32 = NewLazySystemDLL("user32.dll") moduserenv = NewLazySystemDLL("userenv.dll") modversion = NewLazySystemDLL("version.dll") + modwinmm = NewLazySystemDLL("winmm.dll") modwintrust = NewLazySystemDLL("wintrust.dll") modws2_32 = NewLazySystemDLL("ws2_32.dll") modwtsapi32 = NewLazySystemDLL("wtsapi32.dll") @@ -468,6 +469,8 @@ var ( procGetFileVersionInfoSizeW = modversion.NewProc("GetFileVersionInfoSizeW") procGetFileVersionInfoW = modversion.NewProc("GetFileVersionInfoW") procVerQueryValueW = modversion.NewProc("VerQueryValueW") + proctimeBeginPeriod = modwinmm.NewProc("timeBeginPeriod") + proctimeEndPeriod = modwinmm.NewProc("timeEndPeriod") procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx") procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW") procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW") @@ -2367,11 +2370,8 @@ func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uin return } -func GetStartupInfo(startupInfo *StartupInfo) (err error) { - r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) - if r1 == 0 { - err = errnoErr(e1) - } +func getStartupInfo(startupInfo *StartupInfo) { + syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) return } @@ -4017,6 +4017,22 @@ func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPoint return } +func TimeBeginPeriod(period uint32) (err error) { + r1, _, e1 := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0) + if r1 != 0 { + err = errnoErr(e1) + } + return +} + +func TimeEndPeriod(period uint32) (err error) { + r1, _, e1 := syscall.Syscall(proctimeEndPeriod.Addr(), 1, uintptr(period), 0, 0) + if r1 != 0 { + err = errnoErr(e1) + } + return +} + func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) { r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data))) if r0 != 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index a4f3202b16..190e16b8fa 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -284,9 +284,6 @@ github.com/davecgh/go-spew/spew # github.com/dennwc/varint v1.0.0 ## explicit; go 1.12 github.com/dennwc/varint -# github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165 -## explicit -github.com/dgryski/go-metro # github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f ## explicit github.com/dgryski/go-rendezvous @@ -842,9 +839,6 @@ github.com/sean-/seed # github.com/segmentio/fasthash v1.0.3 ## explicit; go 1.11 github.com/segmentio/fasthash/fnv1a -# github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb -## explicit; go 1.15 -github.com/seiflotfy/cuckoofilter # github.com/sercand/kuberesolver v2.4.0+incompatible => github.com/sercand/kuberesolver/v4 v4.0.0 ## explicit; go 1.14 github.com/sercand/kuberesolver @@ -875,7 +869,7 @@ github.com/stretchr/objx github.com/stretchr/testify/assert github.com/stretchr/testify/mock github.com/stretchr/testify/require -# github.com/thanos-io/objstore v0.0.0-20230816175749-20395bffdf26 +# github.com/thanos-io/objstore v0.0.0-20230913122821-eb06103887ab ## explicit; go 1.18 github.com/thanos-io/objstore github.com/thanos-io/objstore/exthttp @@ -908,7 +902,7 @@ github.com/thanos-io/promql-engine/logicalplan github.com/thanos-io/promql-engine/parser github.com/thanos-io/promql-engine/query github.com/thanos-io/promql-engine/worker -# github.com/thanos-io/thanos v0.32.3-0.20230911095949-f6a39507b6bd +# github.com/thanos-io/thanos v0.32.3-0.20230911095949-f6a39507b6bd => github.com/yeya24/thanos v0.2.2-0.20230918182451-e0a5d841de76 ## explicit; go 1.18 github.com/thanos-io/thanos/pkg/block github.com/thanos-io/thanos/pkg/block/indexheader @@ -948,7 +942,6 @@ github.com/thanos-io/thanos/pkg/store/hintspb github.com/thanos-io/thanos/pkg/store/labelpb github.com/thanos-io/thanos/pkg/store/storepb github.com/thanos-io/thanos/pkg/store/storepb/prompb -github.com/thanos-io/thanos/pkg/stringset github.com/thanos-io/thanos/pkg/strutil github.com/thanos-io/thanos/pkg/targets/targetspb github.com/thanos-io/thanos/pkg/tenancy @@ -1230,7 +1223,7 @@ golang.org/x/oauth2/jwt # golang.org/x/sync v0.3.0 ## explicit; go 1.17 golang.org/x/sync/errgroup -# golang.org/x/sys v0.11.0 +# golang.org/x/sys v0.12.0 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs @@ -1459,3 +1452,4 @@ sigs.k8s.io/yaml # github.com/google/gnostic => github.com/googleapis/gnostic v0.6.9 # gopkg.in/alecthomas/kingpin.v2 => github.com/alecthomas/kingpin v1.3.8-0.20210301060133-17f40c25f497 # github.com/sercand/kuberesolver => github.com/sercand/kuberesolver/v4 v4.0.0 +# github.com/thanos-io/thanos => github.com/yeya24/thanos v0.2.2-0.20230918182451-e0a5d841de76