From dcd0f925f4c6b592b0fe46484028a5c2f7a6df15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Fri, 31 Jul 2020 11:23:05 +0200 Subject: [PATCH 1/3] Update Thanos to latest master (v0.13.1-0.20200731083140-69b87607decf). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- go.mod | 2 +- go.sum | 2 + pkg/ingester/ingester_v2.go | 3 +- pkg/storegateway/bucket_store_metrics.go | 2 +- .../thanos-io/thanos/pkg/block/fetcher.go | 4 + .../thanos/pkg/cacheutil/memcached_client.go | 17 +++- .../thanos-io/thanos/pkg/shipper/shipper.go | 40 ++------ .../thanos-io/thanos/pkg/store/bucket.go | 93 +++++++++++++++---- .../thanos/pkg/store/cache/memcached.go | 1 + .../thanos-io/thanos/pkg/store/limiter.go | 6 +- .../thanos-io/thanos/pkg/store/prometheus.go | 1 + vendor/modules.txt | 2 +- 12 files changed, 109 insertions(+), 64 deletions(-) diff --git a/go.mod b/go.mod index 92aebc0a91..68a3dec35d 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e github.com/spf13/afero v1.2.2 github.com/stretchr/testify v1.5.1 - github.com/thanos-io/thanos v0.13.1-0.20200722150410-6485769a1350 + github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf github.com/uber/jaeger-client-go v2.24.0+incompatible github.com/weaveworks/common v0.0.0-20200625145055-4b1847531bc9 go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50 diff --git a/go.sum b/go.sum index 2f389b8a25..d0bbde867c 100644 --- a/go.sum +++ b/go.sum @@ -1086,6 +1086,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/thanos-io/thanos v0.8.1-0.20200109203923-552ffa4c1a0d/go.mod h1:usT/TxtJQ7DzinTt+G9kinDQmRS5sxwu0unVKZ9vdcw= github.com/thanos-io/thanos v0.13.1-0.20200722150410-6485769a1350 h1:yAiiVhWtQuic/JWFU6jSvBE/LR1GbSwBRgjnEYqemFI= github.com/thanos-io/thanos v0.13.1-0.20200722150410-6485769a1350/go.mod h1:m/jG5dV9LQ+rcKdCDQgrSxqQz+vDddqa+Zn4FRoXDbo= +github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf h1:yq9nWz5Iv6ejE9d/fToxgcVDk8iuAcpvrWfsHsNySxU= +github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf/go.mod h1:G8caR6G7pSDreRDvFm9wFuyjEBztmr8Ag3kBYpa/fEc= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/pkg/ingester/ingester_v2.go b/pkg/ingester/ingester_v2.go index 80a31d7ee9..78d9a264e2 100644 --- a/pkg/ingester/ingester_v2.go +++ b/pkg/ingester/ingester_v2.go @@ -987,7 +987,8 @@ func (i *Ingester) createTSDB(userID string) (*userTSDB, error) { cortex_tsdb.NewUserBucketClient(userID, i.TSDBState.bucket), func() labels.Labels { return l }, metadata.ReceiveSource, - true, // Allow out of order uploads. It's fine in Cortex's context. + false, // No need to upload compacted blocks. Cortex compactor takes care of that. + true, // Allow out of order uploads. It's fine in Cortex's context. ) } diff --git a/pkg/storegateway/bucket_store_metrics.go b/pkg/storegateway/bucket_store_metrics.go index 5b2d6ba8c1..096e17af1c 100644 --- a/pkg/storegateway/bucket_store_metrics.go +++ b/pkg/storegateway/bucket_store_metrics.go @@ -194,7 +194,7 @@ func (m *BucketStoreMetrics) Collect(out chan<- prometheus.Metric) { data.SendSumOfCountersWithLabels(out, m.cachedPostingsCompressions, "thanos_bucket_store_cached_postings_compressions_total", "op") data.SendSumOfCountersWithLabels(out, m.cachedPostingsCompressionErrors, "thanos_bucket_store_cached_postings_compression_errors_total", "op") - data.SendSumOfCountersWithLabels(out, m.cachedPostingsCompressionTimeSeconds, "thanos_bucket_store_cached_postings_compression_time_seconds", "op") + data.SendSumOfCountersWithLabels(out, m.cachedPostingsCompressionTimeSeconds, "thanos_bucket_store_cached_postings_compression_time_seconds_total", "op") data.SendSumOfCountersWithLabels(out, m.cachedPostingsOriginalSizeBytes, "thanos_bucket_store_cached_postings_original_size_bytes_total") data.SendSumOfCountersWithLabels(out, m.cachedPostingsCompressedSizeBytes, "thanos_bucket_store_cached_postings_compressed_size_bytes_total") } diff --git a/vendor/github.com/thanos-io/thanos/pkg/block/fetcher.go b/vendor/github.com/thanos-io/thanos/pkg/block/fetcher.go index ed4a209cc6..bd83f6e2fb 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/block/fetcher.go +++ b/vendor/github.com/thanos-io/thanos/pkg/block/fetcher.go @@ -683,6 +683,10 @@ func NewReplicaLabelRemover(logger log.Logger, replicaLabels []string) *ReplicaL // Modify modifies external labels of existing blocks, it removes given replica labels from the metadata of blocks that have it. func (r *ReplicaLabelRemover) Modify(_ context.Context, metas map[ulid.ULID]*metadata.Meta, modified *extprom.TxGaugeVec) error { + if len(r.replicaLabels) == 0 { + return nil + } + for u, meta := range metas { l := meta.Thanos.Labels for _, replicaLabel := range r.replicaLabels { 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 16e528d65e..ca1dff1d73 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 @@ -24,9 +24,10 @@ import ( ) const ( - opSet = "set" - opGetMulti = "getmulti" - reasonMaxItemSize = "max-item-size" + opSet = "set" + opGetMulti = "getmulti" + reasonMaxItemSize = "max-item-size" + reasonAsyncBufferFull = "async-buffer-full" ) var ( @@ -233,6 +234,7 @@ func newMemcachedClient( }, []string{"operation", "reason"}) c.skipped.WithLabelValues(opGetMulti, reasonMaxItemSize) c.skipped.WithLabelValues(opSet, reasonMaxItemSize) + c.skipped.WithLabelValues(opSet, reasonAsyncBufferFull) c.duration = promauto.With(reg).NewHistogramVec(prometheus.HistogramOpts{ Name: "thanos_memcached_operation_duration_seconds", @@ -276,7 +278,7 @@ func (c *memcachedClient) SetAsync(_ context.Context, key string, value []byte, return nil } - return c.enqueueAsync(func() { + err := c.enqueueAsync(func() { start := time.Now() c.operations.WithLabelValues(opSet).Inc() @@ -297,6 +299,13 @@ func (c *memcachedClient) SetAsync(_ context.Context, key string, value []byte, c.duration.WithLabelValues(opSet).Observe(time.Since(start).Seconds()) }) + + if 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.asyncQueue)) + return nil + } + return err } func (c *memcachedClient) GetMulti(ctx context.Context, keys []string) map[string][]byte { diff --git a/vendor/github.com/thanos-io/thanos/pkg/shipper/shipper.go b/vendor/github.com/thanos-io/thanos/pkg/shipper/shipper.go index 5c961f4459..30496e43c0 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/shipper/shipper.go +++ b/vendor/github.com/thanos-io/thanos/pkg/shipper/shipper.go @@ -83,8 +83,9 @@ type Shipper struct { allowOutOfOrderUploads bool } -// New creates a new shipper that detects new TSDB blocks in dir and uploads them -// to remote if necessary. It attaches the Thanos metadata section in each meta JSON file. +// New creates a new shipper that detects new TSDB blocks in dir and uploads them to +// remote if necessary. It attaches the Thanos metadata section in each meta JSON file. +// If uploadCompacted is enabled, it also uploads compacted blocks which are already in filesystem. func New( logger log.Logger, r prometheus.Registerer, @@ -92,6 +93,7 @@ func New( bucket objstore.Bucket, lbls func() labels.Labels, source metadata.SourceType, + uploadCompacted bool, allowOutOfOrderUploads bool, ) *Shipper { if logger == nil { @@ -106,40 +108,10 @@ func New( dir: dir, bucket: bucket, labels: lbls, - metrics: newMetrics(r, false), + metrics: newMetrics(r, uploadCompacted), source: source, allowOutOfOrderUploads: allowOutOfOrderUploads, - } -} - -// NewWithCompacted creates a new shipper that detects new TSDB blocks in dir and uploads them -// to remote if necessary, including compacted blocks which are already in filesystem. -// It attaches the Thanos metadata section in each meta JSON file. -func NewWithCompacted( - logger log.Logger, - r prometheus.Registerer, - dir string, - bucket objstore.Bucket, - lbls func() labels.Labels, - source metadata.SourceType, - allowOutOfOrderUploads bool, -) *Shipper { - if logger == nil { - logger = log.NewNopLogger() - } - if lbls == nil { - lbls = func() labels.Labels { return nil } - } - - return &Shipper{ - logger: logger, - dir: dir, - bucket: bucket, - labels: lbls, - metrics: newMetrics(r, true), - source: source, - uploadCompacted: true, - allowOutOfOrderUploads: allowOutOfOrderUploads, + uploadCompacted: uploadCompacted, } } 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 d49dc51a3d..f511149b0b 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go @@ -82,6 +82,10 @@ const ( DefaultPostingOffsetInMemorySampling = 32 partitionerMaxGapSize = 512 * 1024 + + // Labels for metrics. + labelEncode = "encode" + labelDecode = "decode" ) type bucketStoreMetrics struct { @@ -191,14 +195,23 @@ func newBucketStoreMetrics(reg prometheus.Registerer) *bucketStoreMetrics { Name: "thanos_bucket_store_cached_postings_compressions_total", Help: "Number of postings compressions before storing to index cache.", }, []string{"op"}) + m.cachedPostingsCompressions.WithLabelValues(labelEncode) + m.cachedPostingsCompressions.WithLabelValues(labelDecode) + m.cachedPostingsCompressionErrors = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "thanos_bucket_store_cached_postings_compression_errors_total", Help: "Number of postings compression errors.", }, []string{"op"}) + m.cachedPostingsCompressionErrors.WithLabelValues(labelEncode) + m.cachedPostingsCompressionErrors.WithLabelValues(labelDecode) + m.cachedPostingsCompressionTimeSeconds = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ - Name: "thanos_bucket_store_cached_postings_compression_time_seconds", + Name: "thanos_bucket_store_cached_postings_compression_time_seconds_total", Help: "Time spent compressing postings before storing them into postings cache.", }, []string{"op"}) + m.cachedPostingsCompressionTimeSeconds.WithLabelValues(labelEncode) + m.cachedPostingsCompressionTimeSeconds.WithLabelValues(labelDecode) + m.cachedPostingsOriginalSizeBytes = promauto.With(reg).NewCounter(prometheus.CounterOpts{ Name: "thanos_bucket_store_cached_postings_original_size_bytes_total", Help: "Original size of postings stored into cache.", @@ -945,12 +958,12 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, srv storepb.Store_Serie s.metrics.seriesDataSizeTouched.WithLabelValues("chunks").Observe(float64(stats.chunksTouchedSizeSum)) s.metrics.seriesDataSizeFetched.WithLabelValues("chunks").Observe(float64(stats.chunksFetchedSizeSum)) s.metrics.resultSeriesCount.Observe(float64(stats.mergedSeriesCount)) - s.metrics.cachedPostingsCompressions.WithLabelValues("encode").Add(float64(stats.cachedPostingsCompressions)) - s.metrics.cachedPostingsCompressions.WithLabelValues("decode").Add(float64(stats.cachedPostingsDecompressions)) - s.metrics.cachedPostingsCompressionErrors.WithLabelValues("encode").Add(float64(stats.cachedPostingsCompressionErrors)) - s.metrics.cachedPostingsCompressionErrors.WithLabelValues("decode").Add(float64(stats.cachedPostingsDecompressionErrors)) - s.metrics.cachedPostingsCompressionTimeSeconds.WithLabelValues("encode").Add(stats.cachedPostingsCompressionTimeSum.Seconds()) - s.metrics.cachedPostingsCompressionTimeSeconds.WithLabelValues("decode").Add(stats.cachedPostingsDecompressionTimeSum.Seconds()) + s.metrics.cachedPostingsCompressions.WithLabelValues(labelEncode).Add(float64(stats.cachedPostingsCompressions)) + s.metrics.cachedPostingsCompressions.WithLabelValues(labelDecode).Add(float64(stats.cachedPostingsDecompressions)) + s.metrics.cachedPostingsCompressionErrors.WithLabelValues(labelEncode).Add(float64(stats.cachedPostingsCompressionErrors)) + s.metrics.cachedPostingsCompressionErrors.WithLabelValues(labelDecode).Add(float64(stats.cachedPostingsDecompressionErrors)) + s.metrics.cachedPostingsCompressionTimeSeconds.WithLabelValues(labelEncode).Add(stats.cachedPostingsCompressionTimeSum.Seconds()) + s.metrics.cachedPostingsCompressionTimeSeconds.WithLabelValues(labelDecode).Add(stats.cachedPostingsDecompressionTimeSum.Seconds()) s.metrics.cachedPostingsOriginalSizeBytes.Add(float64(stats.cachedPostingsOriginalSizeSum)) s.metrics.cachedPostingsCompressedSizeBytes.Add(float64(stats.cachedPostingsCompressedSizeSum)) @@ -1953,14 +1966,15 @@ func (r *bucketIndexReader) Close() error { type bucketChunkReader struct { ctx context.Context block *bucketBlock - stats *queryStats preloads [][]uint32 - mtx sync.Mutex - chunks map[uint64]chunkenc.Chunk - // Byte slice to return to the chunk pool on close. - chunkBytes []*[]byte + // Mutex protects access to following fields, when updated from chunks-loading goroutines. + // After chunks are loaded, mutex is no longer used. + mtx sync.Mutex + chunks map[uint64]chunkenc.Chunk + stats *queryStats + chunkBytes []*[]byte // Byte slice to return to the chunk pool on close. } func newBucketChunkReader(ctx context.Context, block *bucketBlock) *bucketChunkReader { @@ -2013,21 +2027,29 @@ func (r *bucketChunkReader) preload() error { return g.Wait() } +// loadChunks will read range [start, end] from the segment file with sequence number seq. +// This data range covers chunks starting at supplied offsets. func (r *bucketChunkReader) loadChunks(ctx context.Context, offs []uint32, seq int, start, end uint32) error { - begin := time.Now() + fetchBegin := time.Now() b, err := r.block.readChunkRange(ctx, seq, int64(start), int64(end-start)) if err != nil { return errors.Wrapf(err, "read range for %d", seq) } + locked := true r.mtx.Lock() - defer r.mtx.Unlock() + + defer func() { + if locked { + r.mtx.Unlock() + } + }() r.chunkBytes = append(r.chunkBytes, b) r.stats.chunksFetchCount++ r.stats.chunksFetched += len(offs) - r.stats.chunksFetchDurationSum += time.Since(begin) + r.stats.chunksFetchDurationSum += time.Since(fetchBegin) r.stats.chunksFetchedSizeSum += int(end - start) for _, o := range offs { @@ -2037,11 +2059,44 @@ func (r *bucketChunkReader) loadChunks(ctx context.Context, offs []uint32, seq i if n < 1 { return errors.New("reading chunk length failed") } - if len(cb) < n+int(l)+1 { - return errors.Errorf("preloaded chunk too small, expecting %d", n+int(l)+1) + + chunkRef := uint64(seq<<32) | uint64(o) + + // Chunk length is n (number of bytes used to encode chunk data), 1 for chunk encoding and l for actual chunk data. + // There is also crc32 after the chunk, but we ignore that. + chLen := n + 1 + int(l) + if len(cb) >= chLen { + r.chunks[chunkRef] = rawChunk(cb[n:chLen]) + continue + } + + // If we didn't fetch enough data for the chunk, fetch more. This can only really happen for last + // chunk in the list of fetched chunks, otherwise partitioner would merge fetch ranges together. + r.mtx.Unlock() + locked = false + + fetchBegin = time.Now() + + // Read entire chunk into new buffer. + nb, err := r.block.readChunkRange(ctx, seq, int64(o), int64(chLen)) + if err != nil { + return errors.Wrapf(err, "preloaded chunk too small, expecting %d, and failed to fetch full chunk", chLen) } - cid := uint64(seq<<32) | uint64(o) - r.chunks[cid] = rawChunk(cb[n : n+int(l)+1]) + + cb = *nb + if len(cb) != chLen { + return errors.Errorf("preloaded chunk too small, expecting %d", chLen) + } + + r.mtx.Lock() + locked = true + + r.chunkBytes = append(r.chunkBytes, nb) + r.stats.chunksFetchCount++ + r.stats.chunksFetchDurationSum += time.Since(fetchBegin) + r.stats.chunksFetchedSizeSum += len(cb) + + r.chunks[chunkRef] = rawChunk(cb[n:]) } return nil } diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/cache/memcached.go b/vendor/github.com/thanos-io/thanos/pkg/store/cache/memcached.go index 74ce30299e..abd2b3659d 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/cache/memcached.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/cache/memcached.go @@ -13,6 +13,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/pkg/labels" + "github.com/thanos-io/thanos/pkg/cacheutil" ) diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/limiter.go b/vendor/github.com/thanos-io/thanos/pkg/store/limiter.go index 1e354721c2..c60be901e9 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/limiter.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/limiter.go @@ -5,10 +5,10 @@ package store import ( "sync" - "sync/atomic" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" + "go.uber.org/atomic" ) type ChunksLimiter interface { @@ -25,7 +25,7 @@ type ChunksLimiterFactory func(failedCounter prometheus.Counter) ChunksLimiter // Limiter is a simple mechanism for checking if something has passed a certain threshold. type Limiter struct { limit uint64 - reserved uint64 + reserved atomic.Uint64 // Counter metric which we will increase if limit is exceeded. failedCounter prometheus.Counter @@ -42,7 +42,7 @@ func (l *Limiter) Reserve(num uint64) error { if l.limit == 0 { return nil } - if reserved := atomic.AddUint64(&l.reserved, num); reserved > l.limit { + if reserved := l.reserved.Add(num); reserved > l.limit { // We need to protect from the counter being incremented twice due to concurrency // while calling Reserve(). l.failedOnce.Do(l.failedCounter.Inc) 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 6d5a737a90..83c7f8120f 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go @@ -419,6 +419,7 @@ func (p *PrometheusStore) startPromRemoteRead(ctx context.Context, q *prompb.Que } preq.Header.Add("Content-Encoding", "snappy") preq.Header.Set("Content-Type", "application/x-stream-protobuf") + preq.Header.Set("X-Prometheus-Remote-Read-Version", "0.1.0") preq.Header.Set("User-Agent", thanoshttp.ThanosUserAgent) tracing.DoInSpan(ctx, "query_prometheus_request", func(ctx context.Context) { diff --git a/vendor/modules.txt b/vendor/modules.txt index b3ba670a41..8a0bd7cbd9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -626,7 +626,7 @@ github.com/stretchr/objx github.com/stretchr/testify/assert github.com/stretchr/testify/mock github.com/stretchr/testify/require -# github.com/thanos-io/thanos v0.13.1-0.20200722150410-6485769a1350 +# github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf ## explicit github.com/thanos-io/thanos/pkg/block github.com/thanos-io/thanos/pkg/block/indexheader From 7144d0a9c3d37e220fea3d1cd039b1329a4b8cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Fri, 31 Jul 2020 11:29:26 +0200 Subject: [PATCH 2/3] Fixed test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- pkg/storegateway/bucket_store_metrics_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storegateway/bucket_store_metrics_test.go b/pkg/storegateway/bucket_store_metrics_test.go index 574b8c40b1..29e0f9955a 100644 --- a/pkg/storegateway/bucket_store_metrics_test.go +++ b/pkg/storegateway/bucket_store_metrics_test.go @@ -371,7 +371,7 @@ func newMockedBucketStoreMetrics(reg prometheus.Registerer) *mockedBucketStoreMe Help: "Number of postings compression errors.", }, []string{"op"}) m.cachedPostingsCompressionTimeSeconds = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ - Name: "thanos_bucket_store_cached_postings_compression_time_seconds", + Name: "thanos_bucket_store_cached_postings_compression_time_seconds_total", Help: "Time spent compressing postings before storing them into postings cache.", }, []string{"op"}) m.cachedPostingsOriginalSizeBytes = promauto.With(reg).NewCounter(prometheus.CounterOpts{ From c347ec2a13f689e3c4a4299e14384285514b5d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Fri, 31 Jul 2020 11:30:57 +0200 Subject: [PATCH 3/3] Go mod tidy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index d0bbde867c..c8705a042d 100644 --- a/go.sum +++ b/go.sum @@ -1084,8 +1084,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/thanos-io/thanos v0.8.1-0.20200109203923-552ffa4c1a0d/go.mod h1:usT/TxtJQ7DzinTt+G9kinDQmRS5sxwu0unVKZ9vdcw= -github.com/thanos-io/thanos v0.13.1-0.20200722150410-6485769a1350 h1:yAiiVhWtQuic/JWFU6jSvBE/LR1GbSwBRgjnEYqemFI= -github.com/thanos-io/thanos v0.13.1-0.20200722150410-6485769a1350/go.mod h1:m/jG5dV9LQ+rcKdCDQgrSxqQz+vDddqa+Zn4FRoXDbo= github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf h1:yq9nWz5Iv6ejE9d/fToxgcVDk8iuAcpvrWfsHsNySxU= github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf/go.mod h1:G8caR6G7pSDreRDvFm9wFuyjEBztmr8Ag3kBYpa/fEc= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=