From c9d6ca8e65bd59df031c9070a6a2e3508eacbcaf Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Tue, 12 Dec 2023 14:20:27 -0800 Subject: [PATCH] upgrade Thanos version to commit fc1a6edf7acc82ec21ebc9fd641ce7afc4fed049 (#5708) Signed-off-by: Ben Ye --- go.mod | 2 +- go.sum | 4 +- .../thanos-io/thanos/pkg/compact/compact.go | 4 +- .../thanos/pkg/rules/rulespb/rpc.pb.go | 154 ++++++++++-------- .../thanos/pkg/rules/rulespb/rpc.proto | 1 + .../thanos-io/thanos/pkg/store/bucket.go | 48 ++++-- .../thanos/pkg/store/cache/factory.go | 1 + .../pkg/store/cache/tracing_index_cache.go | 92 +++++++++++ .../thanos-io/thanos/pkg/store/prometheus.go | 7 +- .../thanos-io/thanos/pkg/store/tsdb.go | 7 +- vendor/modules.txt | 2 +- 11 files changed, 234 insertions(+), 88 deletions(-) create mode 100644 vendor/github.com/thanos-io/thanos/pkg/store/cache/tracing_index_cache.go diff --git a/go.mod b/go.mod index 9ab066a70f..2a1333fcfd 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/thanos-io/objstore v0.0.0-20231123170144-bffedaa58acb github.com/thanos-io/promql-engine v0.0.0-20231127105941-257543af55e8 - github.com/thanos-io/thanos v0.32.5-0.20231204192512-28407d61e72d + github.com/thanos-io/thanos v0.32.5-0.20231212162152-fc1a6edf7acc github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/weaveworks/common v0.0.0-20221201103051-7c2720a9024d go.etcd.io/etcd/api/v3 v3.5.10 diff --git a/go.sum b/go.sum index cb7a132ec9..57fffcdd9e 100644 --- a/go.sum +++ b/go.sum @@ -1509,8 +1509,8 @@ github.com/thanos-io/objstore v0.0.0-20231123170144-bffedaa58acb h1:3s/a99MWpt5Z github.com/thanos-io/objstore v0.0.0-20231123170144-bffedaa58acb/go.mod h1:RMvJQnpB4QQiYGg1gF8mnPJg6IkIPY28Buh8f6b+F0c= github.com/thanos-io/promql-engine v0.0.0-20231127105941-257543af55e8 h1:KX57eKPq3yzX7ENyd0+fOfPb6v9tjOCLRT8/9waWs/w= github.com/thanos-io/promql-engine v0.0.0-20231127105941-257543af55e8/go.mod h1:vfXJv1JXNdLfHnjsHsLLJl5tyI7KblF76Wo5lZ9YC4Q= -github.com/thanos-io/thanos v0.32.5-0.20231204192512-28407d61e72d h1:GJhhQxnEENOF0ZgHfK2WAC0qwQhAnexld0Ujhe0xgrY= -github.com/thanos-io/thanos v0.32.5-0.20231204192512-28407d61e72d/go.mod h1:tADvTBUwVH/yjWymDztTV8/bErQVIGFlHIZqXc07QQo= +github.com/thanos-io/thanos v0.32.5-0.20231212162152-fc1a6edf7acc h1:X4/ZoRAXG4n+15WxNJ3uwju0gKoPCzzyQwtKDtUOov0= +github.com/thanos-io/thanos v0.32.5-0.20231212162152-fc1a6edf7acc/go.mod h1:tADvTBUwVH/yjWymDztTV8/bErQVIGFlHIZqXc07QQo= 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= diff --git a/vendor/github.com/thanos-io/thanos/pkg/compact/compact.go b/vendor/github.com/thanos-io/thanos/pkg/compact/compact.go index 45ff06d1ff..ae0d48bffd 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/compact/compact.go +++ b/vendor/github.com/thanos-io/thanos/pkg/compact/compact.go @@ -1286,8 +1286,8 @@ func (cg *Group) compact(ctx context.Context, dir string, planner Planner, comp } level.Info(cg.logger).Log("msg", "finished running post compaction callback", "result_block", compID) - level.Info(cg.logger).Log("msg", "finished compacting blocks", "result_block", compID, "source_blocks", sourceBlockStr, - "duration", time.Since(groupCompactionBegin), "duration_ms", time.Since(groupCompactionBegin).Milliseconds()) + level.Info(cg.logger).Log("msg", "finished compacting blocks", "duration", time.Since(groupCompactionBegin), + "duration_ms", time.Since(groupCompactionBegin).Milliseconds(), "result_block", compID, "source_blocks", sourceBlockStr) return true, compID, nil } diff --git a/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.pb.go b/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.pb.go index 2089c9b393..941014a06a 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.pb.go +++ b/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.pb.go @@ -459,6 +459,7 @@ type Alert struct { LastError string `protobuf:"bytes,9,opt,name=last_error,json=lastError,proto3" json:"lastError,omitempty"` EvaluationDurationSeconds float64 `protobuf:"fixed64,10,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` LastEvaluation time.Time `protobuf:"bytes,11,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` + KeepFiringForSeconds float64 `protobuf:"fixed64,12,opt,name=keep_firing_for_seconds,json=keepFiringForSeconds,proto3" json:"keepFiringFor"` } func (m *Alert) Reset() { *m = Alert{} } @@ -553,71 +554,74 @@ func init() { func init() { proto.RegisterFile("rules/rulespb/rpc.proto", fileDescriptor_91b1d28f30eb5efb) } var fileDescriptor_91b1d28f30eb5efb = []byte{ - // 1022 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x4f, 0xe3, 0x46, - 0x14, 0xb6, 0x71, 0xec, 0xc4, 0x2f, 0xc0, 0xd2, 0xd9, 0x45, 0x18, 0xb6, 0x8a, 0x51, 0x24, 0x2a, - 0x5a, 0x75, 0x93, 0x0a, 0xb4, 0x5b, 0xed, 0xa9, 0xc2, 0x40, 0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8, 0xea, 0xdf, 0x08, 0x3d, 0xcb, 0x07, 0x8f, 0xa6, - 0xfd, 0xfa, 0xad, 0x2d, 0x4f, 0x78, 0xb5, 0x40, 0x7d, 0x61, 0x06, 0x1b, 0x57, 0xbf, 0xd7, 0x8c, - 0xab, 0xeb, 0x9a, 0xf9, 0xee, 0xba, 0x66, 0xfe, 0x76, 0x5d, 0x33, 0xdf, 0xde, 0xd4, 0x8c, 0x77, - 0x37, 0x35, 0xe3, 0x97, 0x9b, 0x9a, 0xf1, 0xaa, 0x9c, 0xfd, 0xee, 0x9e, 0x3a, 0xea, 0x70, 0xdb, - 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x4a, 0xb5, 0xe4, 0x06, 0x0b, 0x00, 0x00, + // 1058 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x4e, 0x23, 0xc7, + 0x13, 0xf7, 0x60, 0xcf, 0xd8, 0x53, 0xc6, 0x2c, 0xdb, 0x0b, 0x62, 0x60, 0xff, 0xf2, 0x20, 0x4b, + 0xfc, 0x45, 0xa2, 0xac, 0x1d, 0x81, 0x76, 0xa3, 0x3d, 0x45, 0x98, 0x8f, 0x05, 0x09, 0x91, 0x55, + 0x1b, 0xe5, 0xb0, 0x39, 0x38, 0x8d, 0x69, 0xcc, 0x28, 0xe3, 0x99, 0xd9, 0xee, 0x36, 0x11, 0x6f, + 0xb1, 0xe7, 0xbc, 0x48, 0x5e, 0x81, 0x5b, 0xf6, 0x98, 0x93, 0x93, 0xc0, 0x29, 0x3e, 0xe4, 0x19, + 0xa2, 0xae, 0x9e, 0xb1, 0x0d, 0x81, 0xb0, 0x9b, 0x90, 0xcb, 0x54, 0x77, 0xd5, 0xaf, 0x7a, 0xea, + 0xe3, 0xd7, 0x35, 0x03, 0x0b, 0xa2, 0x1f, 0x72, 0xd9, 0xc0, 0x67, 0x72, 0x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xaa, 0xf5, 0xeb, 0x65, 0xd5, 0x7a, + 0x77, 0x55, 0xcd, 0xbd, 0xbf, 0xaa, 0xe6, 0x7e, 0xbe, 0xaa, 0xe6, 0xde, 0x14, 0xd3, 0x1f, 0xe7, + 0x23, 0x07, 0x93, 0x5b, 0xff, 0x33, 0x00, 0x00, 0xff, 0xff, 0xeb, 0xed, 0x6d, 0x27, 0x50, 0x0b, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1122,6 +1126,12 @@ func (m *Alert) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.KeepFiringForSeconds != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.KeepFiringForSeconds)))) + i-- + dAtA[i] = 0x61 + } n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastEvaluation, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation):]) if err8 != nil { return 0, err8 @@ -1511,6 +1521,9 @@ func (m *Alert) Size() (n int) { } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation) n += 1 + l + sovRpc(uint64(l)) + if m.KeepFiringForSeconds != 0 { + n += 9 + } return n } @@ -2787,6 +2800,17 @@ func (m *Alert) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field KeepFiringForSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.KeepFiringForSeconds = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) diff --git a/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.proto b/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.proto index c708a1e82e..25d809ede9 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.proto +++ b/vendor/github.com/thanos-io/thanos/pkg/rules/rulespb/rpc.proto @@ -126,6 +126,7 @@ message Alert { string last_error = 9 [(gogoproto.jsontag) = "lastError,omitempty" ]; double evaluation_duration_seconds = 10 [(gogoproto.jsontag) = "evaluationTime" ]; google.protobuf.Timestamp last_evaluation = 11 [(gogoproto.jsontag) = "lastEvaluation", (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + double keep_firing_for_seconds = 12 [(gogoproto.jsontag) = "keepFiringFor" ]; } message RecordingRule { 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 da81fab93a..3ebd6f06a4 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/bucket.go @@ -952,8 +952,10 @@ type blockSeriesClient struct { indexr *bucketIndexReader chunkr *bucketChunkReader loadAggregates []storepb.Aggr - chunksLimiter ChunksLimiter - bytesLimiter BytesLimiter + + seriesLimiter SeriesLimiter + chunksLimiter ChunksLimiter + bytesLimiter BytesLimiter lazyExpandedPostingEnabled bool lazyExpandedPostingsCount prometheus.Counter @@ -986,7 +988,8 @@ func newBlockSeriesClient( logger log.Logger, b *bucketBlock, req *storepb.SeriesRequest, - limiter ChunksLimiter, + seriesLimiter SeriesLimiter, + chunksLimiter ChunksLimiter, bytesLimiter BytesLimiter, blockMatchers []*labels.Matcher, shardMatcher *storepb.ShardMatcher, @@ -1022,7 +1025,8 @@ func newBlockSeriesClient( maxt: req.MaxTime, indexr: b.indexReader(), chunkr: chunkr, - chunksLimiter: limiter, + seriesLimiter: seriesLimiter, + chunksLimiter: chunksLimiter, bytesLimiter: bytesLimiter, skipChunks: req.SkipChunks, seriesFetchDurationSum: seriesFetchDurationSum, @@ -1091,20 +1095,21 @@ func (b *blockSeriesClient) ExpandPostings( } b.lazyPostings = ps - // If lazy expanded posting enabled, it is possible to fetch more series - // so easier to hit the series limit. - if err := seriesLimiter.Reserve(uint64(len(ps.postings))); err != nil { - return httpgrpc.Errorf(int(codes.ResourceExhausted), "exceeded series limit: %s", err) - } - - if b.batchSize > len(ps.postings) { - b.batchSize = len(ps.postings) - } if b.lazyPostings.lazyExpanded() { // Assume lazy expansion could cut actual expanded postings length to 50%. b.expandedPostings = make([]storage.SeriesRef, 0, len(b.lazyPostings.postings)/2) b.lazyExpandedPostingsCount.Inc() + } else { + // Apply series limiter eargerly if lazy postings not enabled. + if err := seriesLimiter.Reserve(uint64(len(ps.postings))); err != nil { + return httpgrpc.Errorf(int(codes.ResourceExhausted), "exceeded series limit: %s", err) + } } + + if b.batchSize > len(ps.postings) { + b.batchSize = len(ps.postings) + } + b.entries = make([]seriesEntry, 0, b.batchSize) return nil } @@ -1169,6 +1174,7 @@ func (b *blockSeriesClient) nextBatch(tenant string) error { return errors.Wrap(err, "preload series") } + seriesMatched := 0 b.entries = b.entries[:0] OUTER: for i := 0; i < len(postingsBatch); i++ { @@ -1209,6 +1215,7 @@ OUTER: continue } + seriesMatched++ s := seriesEntry{lset: completeLabelset} if b.skipChunks { b.entries = append(b.entries, s) @@ -1238,6 +1245,13 @@ OUTER: b.entries = append(b.entries, s) } + if b.lazyPostings.lazyExpanded() { + // Apply series limit before fetching chunks, for actual series matched. + if err := b.seriesLimiter.Reserve(uint64(seriesMatched)); err != nil { + return httpgrpc.Errorf(int(codes.ResourceExhausted), "exceeded series limit: %s", err) + } + } + if !b.skipChunks { if err := b.chunkr.load(b.ctx, b.entries, b.loadAggregates, b.calculateChunkHash, b.bytesLimiter, b.tenant); err != nil { return errors.Wrap(err, "load chunks") @@ -1405,8 +1419,9 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store g, gctx = errgroup.WithContext(ctx) resHints = &hintspb.SeriesResponseHints{} reqBlockMatchers []*labels.Matcher - chunksLimiter = s.chunksLimiterFactory(s.metrics.queriesDropped.WithLabelValues("chunks", tenant)) - seriesLimiter = s.seriesLimiterFactory(s.metrics.queriesDropped.WithLabelValues("series", tenant)) + + chunksLimiter = s.chunksLimiterFactory(s.metrics.queriesDropped.WithLabelValues("chunks", tenant)) + seriesLimiter = s.seriesLimiterFactory(s.metrics.queriesDropped.WithLabelValues("series", tenant)) queryStatsEnabled = false ) @@ -1464,6 +1479,7 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store s.logger, blk, req, + seriesLimiter, chunksLimiter, bytesLimiter, sortedBlockMatchers, @@ -1764,6 +1780,7 @@ func (s *BucketStore) LabelNames(ctx context.Context, req *storepb.LabelNamesReq s.logger, b, seriesReq, + seriesLimiter, nil, bytesLimiter, reqSeriesMatchersNoExtLabels, @@ -1967,6 +1984,7 @@ func (s *BucketStore) LabelValues(ctx context.Context, req *storepb.LabelValuesR s.logger, b, seriesReq, + seriesLimiter, nil, bytesLimiter, reqSeriesMatchersNoExtLabels, diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/cache/factory.go b/vendor/github.com/thanos-io/thanos/pkg/store/cache/factory.go index 80ba850b4c..78279e7b2d 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/cache/factory.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/cache/factory.go @@ -78,6 +78,7 @@ func NewIndexCache(logger log.Logger, confContentYaml []byte, reg prometheus.Reg return nil, errors.Wrap(err, fmt.Sprintf("create %s index cache", cacheConfig.Type)) } + cache = NewTracingIndexCache(string(cacheConfig.Type), cache) if len(cacheConfig.EnabledItems) > 0 { if err = ValidateEnabledItems(cacheConfig.EnabledItems); err != nil { return nil, err diff --git a/vendor/github.com/thanos-io/thanos/pkg/store/cache/tracing_index_cache.go b/vendor/github.com/thanos-io/thanos/pkg/store/cache/tracing_index_cache.go new file mode 100644 index 0000000000..a72ce0d664 --- /dev/null +++ b/vendor/github.com/thanos-io/thanos/pkg/store/cache/tracing_index_cache.go @@ -0,0 +1,92 @@ +// Copyright (c) The Thanos Authors. +// Licensed under the Apache License 2.0. + +package storecache + +import ( + "context" + + "github.com/oklog/ulid" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/storage" + + "github.com/thanos-io/thanos/pkg/tracing" +) + +type TracingIndexCache struct { + name string + cache IndexCache +} + +// NewTracingIndexCache creates an index cache wrapper with traces instrumentation. +func NewTracingIndexCache(name string, cache IndexCache) *TracingIndexCache { + return &TracingIndexCache{name: name, cache: cache} +} + +// StorePostings stores postings for a single series. +func (c *TracingIndexCache) StorePostings(blockID ulid.ULID, l labels.Label, v []byte, tenant string) { + c.cache.StorePostings(blockID, l, v, tenant) +} + +// FetchMultiPostings fetches multiple postings - each identified by a label - +// and returns a map containing cache hits, along with a list of missing keys. +func (c *TracingIndexCache) FetchMultiPostings(ctx context.Context, blockID ulid.ULID, keys []labels.Label, tenant string) (hits map[labels.Label][]byte, misses []labels.Label) { + span, newCtx := tracing.StartSpan(ctx, "fetch_multi_postings", tracing.Tags{ + "name": c.name, + "block.id": blockID.String(), + "requested": len(keys), + }) + defer span.Finish() + hits, misses = c.cache.FetchMultiPostings(newCtx, blockID, keys, tenant) + span.SetTag("hits", len(hits)) + dataBytes := 0 + for _, v := range hits { + dataBytes += len(v) + } + span.SetTag("bytes", dataBytes) + return hits, misses +} + +// StoreExpandedPostings stores expanded postings for a set of label matchers. +func (c *TracingIndexCache) StoreExpandedPostings(blockID ulid.ULID, matchers []*labels.Matcher, v []byte, tenant string) { + c.cache.StoreExpandedPostings(blockID, matchers, v, tenant) +} + +// FetchExpandedPostings fetches expanded postings and returns cached data and a boolean value representing whether it is a cache hit or not. +func (c *TracingIndexCache) FetchExpandedPostings(ctx context.Context, blockID ulid.ULID, matchers []*labels.Matcher, tenant string) (data []byte, exists bool) { + span, newCtx := tracing.StartSpan(ctx, "fetch_expanded_postings", tracing.Tags{ + "name": c.name, + "block.id": blockID.String(), + }) + defer span.Finish() + data, exists = c.cache.FetchExpandedPostings(newCtx, blockID, matchers, tenant) + if exists { + span.SetTag("bytes", len(data)) + } + return data, exists +} + +// StoreSeries stores a single series. Skip intrumenting this method +// excessive spans as a single request can store millions of serieses. +func (c *TracingIndexCache) StoreSeries(blockID ulid.ULID, id storage.SeriesRef, v []byte, tenant string) { + c.cache.StoreSeries(blockID, id, v, tenant) +} + +// FetchMultiSeries fetches multiple series - each identified by ID - from the cache +// and returns a map containing cache hits, along with a list of missing IDs. +func (c *TracingIndexCache) FetchMultiSeries(ctx context.Context, blockID ulid.ULID, ids []storage.SeriesRef, tenant string) (hits map[storage.SeriesRef][]byte, misses []storage.SeriesRef) { + span, newCtx := tracing.StartSpan(ctx, "fetch_multi_series", tracing.Tags{ + "name": c.name, + "block.id": blockID.String(), + "requested": len(ids), + }) + defer span.Finish() + hits, misses = c.cache.FetchMultiSeries(newCtx, blockID, ids, tenant) + span.SetTag("hits", len(hits)) + dataBytes := 0 + for _, v := range hits { + dataBytes += len(v) + } + span.SetTag("bytes", dataBytes) + return hits, misses +} 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 05af3b5d93..ea48f7e1a2 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/prometheus.go @@ -704,11 +704,16 @@ func (p *PrometheusStore) LabelValues(ctx context.Context, r *storepb.LabelValue return nil, status.Error(codes.InvalidArgument, err.Error()) } if !match { - return &storepb.LabelValuesResponse{Values: nil}, nil + return &storepb.LabelValuesResponse{}, nil } // First check for matching external label which has priority. if l := extLset.Get(r.Label); l != "" { + for _, m := range matchers { + if !m.Matches(l) { + return &storepb.LabelValuesResponse{}, nil + } + } return &storepb.LabelValuesResponse{Values: []string{l}}, nil } 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 3f3eaadfc9..8953946a29 100644 --- a/vendor/github.com/thanos-io/thanos/pkg/store/tsdb.go +++ b/vendor/github.com/thanos-io/thanos/pkg/store/tsdb.go @@ -341,10 +341,15 @@ func (s *TSDBStore) LabelValues(ctx context.Context, r *storepb.LabelValuesReque } if !match { - return &storepb.LabelValuesResponse{Values: nil}, nil + return &storepb.LabelValuesResponse{}, nil } if v := s.getExtLset().Get(r.Label); v != "" { + for _, m := range matchers { + if !m.Matches(v) { + return &storepb.LabelValuesResponse{}, nil + } + } return &storepb.LabelValuesResponse{Values: []string{v}}, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index b296b5e657..f471942024 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -909,7 +909,7 @@ github.com/thanos-io/promql-engine/execution/warnings github.com/thanos-io/promql-engine/extlabels github.com/thanos-io/promql-engine/logicalplan github.com/thanos-io/promql-engine/query -# github.com/thanos-io/thanos v0.32.5-0.20231204192512-28407d61e72d +# github.com/thanos-io/thanos v0.32.5-0.20231212162152-fc1a6edf7acc ## explicit; go 1.21 github.com/thanos-io/thanos/pkg/block github.com/thanos-io/thanos/pkg/block/indexheader