diff --git a/CHANGELOG.md b/CHANGELOG.md index 95848c6843..e16af28983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ We use _breaking :warning:_ to mark changes that are not backward compatible (re - [#3431](https://github.com/thanos-io/thanos/pull/3431) Store: Added experimental support to lazy load index-headers at query time. When enabled via `--store.enable-index-header-lazy-reader` flag, the store-gateway will load into memory an index-header only once it's required at query time. Index-header will be automatically released after `--store.index-header-lazy-reader-idle-timeout` of inactivity. - This, generally, reduces baseline memory usage of store when inactive, as well as a total number of mapped files (which is limited to 64k in some systems. - [#3437](https://github.com/thanos-io/thanos/pull/3437) StoreAPI: Added `hints` field to `LabelNamesResponse` and `LabelValuesResponse`. Hints in an opaque data structure that can be used to carry additional information from the store and its content is implementation specific. +- [#3469](https://github.com/thanos-io/thanos/pull/3469) StoreAPI: Added `hints` field to `LabelNamesRequest` and `LabelValuesRequest`. Hints in an opaque data structure that can be used to carry additional information from the store and its content is implementation specific. ### Fixed diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index f93ccf47c3..81e7dbe9d2 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -1074,11 +1074,28 @@ func (s *BucketStore) LabelNames(ctx context.Context, req *storepb.LabelNamesReq var mtx sync.Mutex var sets [][]string + var reqBlockMatchers []*labels.Matcher + + if req.Hints != nil { + reqHints := &hintspb.LabelNamesRequestHints{} + err := types.UnmarshalAny(req.Hints, reqHints) + if err != nil { + return nil, status.Error(codes.InvalidArgument, errors.Wrap(err, "unmarshal label names request hints").Error()) + } + + reqBlockMatchers, err = storepb.TranslateFromPromMatchers(reqHints.BlockMatchers...) + if err != nil { + return nil, status.Error(codes.InvalidArgument, errors.Wrap(err, "translate request hints labels matchers").Error()) + } + } for _, b := range s.blocks { if !b.overlapsClosedInterval(req.Start, req.End) { continue } + if len(reqBlockMatchers) > 0 && !b.matchRelabelLabels(reqBlockMatchers) { + continue + } resHints.AddQueriedBlock(b.meta.ULID) @@ -1141,11 +1158,28 @@ func (s *BucketStore) LabelValues(ctx context.Context, req *storepb.LabelValuesR var mtx sync.Mutex var sets [][]string + var reqBlockMatchers []*labels.Matcher + + if req.Hints != nil { + reqHints := &hintspb.LabelValuesRequestHints{} + err := types.UnmarshalAny(req.Hints, reqHints) + if err != nil { + return nil, status.Error(codes.InvalidArgument, errors.Wrap(err, "unmarshal label names request hints").Error()) + } + + reqBlockMatchers, err = storepb.TranslateFromPromMatchers(reqHints.BlockMatchers...) + if err != nil { + return nil, status.Error(codes.InvalidArgument, errors.Wrap(err, "translate request hints labels matchers").Error()) + } + } for _, b := range s.blocks { if !b.overlapsClosedInterval(req.Start, req.End) { continue } + if len(reqBlockMatchers) > 0 && !b.matchRelabelLabels(reqBlockMatchers) { + continue + } resHints.AddQueriedBlock(b.meta.ULID) diff --git a/pkg/store/bucket_test.go b/pkg/store/bucket_test.go index c785cb78f5..a77c5dc228 100644 --- a/pkg/store/bucket_test.go +++ b/pkg/store/bucket_test.go @@ -2136,6 +2136,41 @@ func TestLabelNamesAndValuesHints(t *testing.T) { {Id: block2.String()}, }, }, + }, { + name: "querying a range containing multiple blocks but filtering a specific block should query only the requested block", + + labelNamesReq: &storepb.LabelNamesRequest{ + Start: 0, + End: 3, + Hints: mustMarshalAny(&hintspb.LabelNamesRequestHints{ + BlockMatchers: []storepb.LabelMatcher{ + {Type: storepb.LabelMatcher_EQ, Name: block.BlockIDLabel, Value: block1.String()}, + }, + }), + }, + expectedNames: labelNamesFromSeriesSet(seriesSet1), + expectedNamesHints: hintspb.LabelNamesResponseHints{ + QueriedBlocks: []hintspb.Block{ + {Id: block1.String()}, + }, + }, + + labelValuesReq: &storepb.LabelValuesRequest{ + Label: "ext1", + Start: 0, + End: 3, + Hints: mustMarshalAny(&hintspb.LabelValuesRequestHints{ + BlockMatchers: []storepb.LabelMatcher{ + {Type: storepb.LabelMatcher_EQ, Name: block.BlockIDLabel, Value: block1.String()}, + }, + }), + }, + expectedValues: []string{"1"}, + expectedValuesHints: hintspb.LabelValuesResponseHints{ + QueriedBlocks: []hintspb.Block{ + {Id: block1.String()}, + }, + }, }, } diff --git a/pkg/store/hintspb/hints.pb.go b/pkg/store/hintspb/hints.pb.go index 8805113968..9f78dbbbb2 100644 --- a/pkg/store/hintspb/hints.pb.go +++ b/pkg/store/hintspb/hints.pb.go @@ -140,6 +140,46 @@ func (m *Block) XXX_DiscardUnknown() { var xxx_messageInfo_Block proto.InternalMessageInfo +type LabelNamesRequestHints struct { + /// block_matchers is a list of label matchers that are evaluated against each single block's + /// labels to filter which blocks get queried. If the list is empty, no per-block filtering + /// is applied. + BlockMatchers []storepb.LabelMatcher `protobuf:"bytes,1,rep,name=block_matchers,json=blockMatchers,proto3" json:"block_matchers"` +} + +func (m *LabelNamesRequestHints) Reset() { *m = LabelNamesRequestHints{} } +func (m *LabelNamesRequestHints) String() string { return proto.CompactTextString(m) } +func (*LabelNamesRequestHints) ProtoMessage() {} +func (*LabelNamesRequestHints) Descriptor() ([]byte, []int) { + return fileDescriptor_b82aa23c4c11e83f, []int{3} +} +func (m *LabelNamesRequestHints) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LabelNamesRequestHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LabelNamesRequestHints.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LabelNamesRequestHints) XXX_Merge(src proto.Message) { + xxx_messageInfo_LabelNamesRequestHints.Merge(m, src) +} +func (m *LabelNamesRequestHints) XXX_Size() int { + return m.Size() +} +func (m *LabelNamesRequestHints) XXX_DiscardUnknown() { + xxx_messageInfo_LabelNamesRequestHints.DiscardUnknown(m) +} + +var xxx_messageInfo_LabelNamesRequestHints proto.InternalMessageInfo + type LabelNamesResponseHints struct { /// queried_blocks is the list of blocks that have been queried. QueriedBlocks []Block `protobuf:"bytes,1,rep,name=queried_blocks,json=queriedBlocks,proto3" json:"queried_blocks"` @@ -149,7 +189,7 @@ func (m *LabelNamesResponseHints) Reset() { *m = LabelNamesResponseHints func (m *LabelNamesResponseHints) String() string { return proto.CompactTextString(m) } func (*LabelNamesResponseHints) ProtoMessage() {} func (*LabelNamesResponseHints) Descriptor() ([]byte, []int) { - return fileDescriptor_b82aa23c4c11e83f, []int{3} + return fileDescriptor_b82aa23c4c11e83f, []int{4} } func (m *LabelNamesResponseHints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -178,6 +218,46 @@ func (m *LabelNamesResponseHints) XXX_DiscardUnknown() { var xxx_messageInfo_LabelNamesResponseHints proto.InternalMessageInfo +type LabelValuesRequestHints struct { + /// block_matchers is a list of label matchers that are evaluated against each single block's + /// labels to filter which blocks get queried. If the list is empty, no per-block filtering + /// is applied. + BlockMatchers []storepb.LabelMatcher `protobuf:"bytes,1,rep,name=block_matchers,json=blockMatchers,proto3" json:"block_matchers"` +} + +func (m *LabelValuesRequestHints) Reset() { *m = LabelValuesRequestHints{} } +func (m *LabelValuesRequestHints) String() string { return proto.CompactTextString(m) } +func (*LabelValuesRequestHints) ProtoMessage() {} +func (*LabelValuesRequestHints) Descriptor() ([]byte, []int) { + return fileDescriptor_b82aa23c4c11e83f, []int{5} +} +func (m *LabelValuesRequestHints) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LabelValuesRequestHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LabelValuesRequestHints.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LabelValuesRequestHints) XXX_Merge(src proto.Message) { + xxx_messageInfo_LabelValuesRequestHints.Merge(m, src) +} +func (m *LabelValuesRequestHints) XXX_Size() int { + return m.Size() +} +func (m *LabelValuesRequestHints) XXX_DiscardUnknown() { + xxx_messageInfo_LabelValuesRequestHints.DiscardUnknown(m) +} + +var xxx_messageInfo_LabelValuesRequestHints proto.InternalMessageInfo + type LabelValuesResponseHints struct { /// queried_blocks is the list of blocks that have been queried. QueriedBlocks []Block `protobuf:"bytes,1,rep,name=queried_blocks,json=queriedBlocks,proto3" json:"queried_blocks"` @@ -187,7 +267,7 @@ func (m *LabelValuesResponseHints) Reset() { *m = LabelValuesResponseHin func (m *LabelValuesResponseHints) String() string { return proto.CompactTextString(m) } func (*LabelValuesResponseHints) ProtoMessage() {} func (*LabelValuesResponseHints) Descriptor() ([]byte, []int) { - return fileDescriptor_b82aa23c4c11e83f, []int{4} + return fileDescriptor_b82aa23c4c11e83f, []int{6} } func (m *LabelValuesResponseHints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,14 +300,16 @@ func init() { proto.RegisterType((*SeriesRequestHints)(nil), "hintspb.SeriesRequestHints") proto.RegisterType((*SeriesResponseHints)(nil), "hintspb.SeriesResponseHints") proto.RegisterType((*Block)(nil), "hintspb.Block") + proto.RegisterType((*LabelNamesRequestHints)(nil), "hintspb.LabelNamesRequestHints") proto.RegisterType((*LabelNamesResponseHints)(nil), "hintspb.LabelNamesResponseHints") + proto.RegisterType((*LabelValuesRequestHints)(nil), "hintspb.LabelValuesRequestHints") proto.RegisterType((*LabelValuesResponseHints)(nil), "hintspb.LabelValuesResponseHints") } func init() { proto.RegisterFile("store/hintspb/hints.proto", fileDescriptor_b82aa23c4c11e83f) } var fileDescriptor_b82aa23c4c11e83f = []byte{ - // 280 bytes of a gzipped FileDescriptorProto + // 295 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0xcf, 0xc8, 0xcc, 0x2b, 0x29, 0x2e, 0x48, 0x82, 0xd0, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xec, 0x50, 0x41, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0xb0, 0x98, 0x3e, 0x88, 0x05, @@ -240,12 +322,13 @@ var fileDescriptor_b82aa23c4c11e83f = []byte{ 0x17, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x42, 0x4c, 0xb6, 0xe6, 0xe2, 0x2b, 0x2c, 0x05, 0x89, 0xa7, 0xc4, 0x83, 0xd5, 0xc3, 0x4c, 0xe6, 0xd3, 0x83, 0x7a, 0x41, 0xcf, 0x09, 0x24, 0x0c, 0x33, 0x13, 0xaa, 0x16, 0x2c, 0x56, 0xac, 0x24, 0xce, 0xc5, 0x0a, 0x66, 0x09, 0xf1, 0x71, 0x31, 0x65, 0xa6, - 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x28, 0x85, 0x71, 0x89, 0x83, 0x5d, - 0xe4, 0x97, 0x98, 0x4b, 0x55, 0x0b, 0xc3, 0xb9, 0x24, 0xc0, 0xe6, 0x86, 0x25, 0xe6, 0x94, 0x52, - 0xd3, 0x60, 0x27, 0xd5, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, - 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, - 0x8e, 0x21, 0x0a, 0x16, 0x9d, 0x49, 0x6c, 0xe0, 0x48, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, - 0x25, 0xc5, 0x79, 0x58, 0xfb, 0x01, 0x00, 0x00, + 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x28, 0x45, 0x73, 0x89, 0x81, 0x5d, + 0xe4, 0x97, 0x98, 0x4b, 0x7d, 0x9f, 0x84, 0x71, 0x89, 0x23, 0x1b, 0x4e, 0x35, 0xdf, 0xc4, 0x40, + 0xcd, 0x0d, 0x4b, 0xcc, 0x29, 0xa5, 0xbe, 0xab, 0xc3, 0xb9, 0x24, 0x50, 0x4c, 0xa7, 0x96, 0xb3, + 0x9d, 0x54, 0x4f, 0x3c, 0x94, 0x63, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, + 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, + 0x28, 0x58, 0x4a, 0x4c, 0x62, 0x03, 0xa7, 0x2f, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, + 0x2f, 0x08, 0x1f, 0xb6, 0x02, 0x00, 0x00, } func (m *SeriesRequestHints) Marshal() (dAtA []byte, err error) { @@ -352,6 +435,43 @@ func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *LabelNamesRequestHints) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LabelNamesRequestHints) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LabelNamesRequestHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BlockMatchers) > 0 { + for iNdEx := len(m.BlockMatchers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BlockMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHints(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *LabelNamesResponseHints) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -389,6 +509,43 @@ func (m *LabelNamesResponseHints) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *LabelValuesRequestHints) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LabelValuesRequestHints) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LabelValuesRequestHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BlockMatchers) > 0 { + for iNdEx := len(m.BlockMatchers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BlockMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHints(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *LabelValuesResponseHints) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -480,6 +637,21 @@ func (m *Block) Size() (n int) { return n } +func (m *LabelNamesRequestHints) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BlockMatchers) > 0 { + for _, e := range m.BlockMatchers { + l = e.Size() + n += 1 + l + sovHints(uint64(l)) + } + } + return n +} + func (m *LabelNamesResponseHints) Size() (n int) { if m == nil { return 0 @@ -495,6 +667,21 @@ func (m *LabelNamesResponseHints) Size() (n int) { return n } +func (m *LabelValuesRequestHints) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BlockMatchers) > 0 { + for _, e := range m.BlockMatchers { + l = e.Size() + n += 1 + l + sovHints(uint64(l)) + } + } + return n +} + func (m *LabelValuesResponseHints) Size() (n int) { if m == nil { return 0 @@ -775,6 +962,93 @@ func (m *Block) Unmarshal(dAtA []byte) error { } return nil } +func (m *LabelNamesRequestHints) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHints + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LabelNamesRequestHints: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LabelNamesRequestHints: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockMatchers", 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 + } + m.BlockMatchers = append(m.BlockMatchers, storepb.LabelMatcher{}) + if err := m.BlockMatchers[len(m.BlockMatchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHints(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHints + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHints + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *LabelNamesResponseHints) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -862,6 +1136,93 @@ func (m *LabelNamesResponseHints) Unmarshal(dAtA []byte) error { } return nil } +func (m *LabelValuesRequestHints) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHints + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LabelValuesRequestHints: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LabelValuesRequestHints: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockMatchers", 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 + } + m.BlockMatchers = append(m.BlockMatchers, storepb.LabelMatcher{}) + if err := m.BlockMatchers[len(m.BlockMatchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHints(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHints + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthHints + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *LabelValuesResponseHints) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/pkg/store/hintspb/hints.proto b/pkg/store/hintspb/hints.proto index 8425f6f050..f7cf68d3ff 100644 --- a/pkg/store/hintspb/hints.proto +++ b/pkg/store/hintspb/hints.proto @@ -35,11 +35,26 @@ message Block { string id = 1; } + +message LabelNamesRequestHints { + /// block_matchers is a list of label matchers that are evaluated against each single block's + /// labels to filter which blocks get queried. If the list is empty, no per-block filtering + /// is applied. + repeated thanos.LabelMatcher block_matchers = 1 [(gogoproto.nullable) = false]; +} + message LabelNamesResponseHints { /// queried_blocks is the list of blocks that have been queried. repeated Block queried_blocks = 1 [(gogoproto.nullable) = false]; } +message LabelValuesRequestHints { + /// block_matchers is a list of label matchers that are evaluated against each single block's + /// labels to filter which blocks get queried. If the list is empty, no per-block filtering + /// is applied. + repeated thanos.LabelMatcher block_matchers = 1 [(gogoproto.nullable) = false]; +} + message LabelValuesResponseHints { /// queried_blocks is the list of blocks that have been queried. repeated Block queried_blocks = 1 [(gogoproto.nullable) = false]; diff --git a/pkg/store/storepb/rpc.pb.go b/pkg/store/storepb/rpc.pb.go index 752ad0e0c1..3eec6a4720 100644 --- a/pkg/store/storepb/rpc.pb.go +++ b/pkg/store/storepb/rpc.pb.go @@ -419,6 +419,10 @@ type LabelNamesRequest struct { PartialResponseStrategy PartialResponseStrategy `protobuf:"varint,2,opt,name=partial_response_strategy,json=partialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partial_response_strategy,omitempty"` Start int64 `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,4,opt,name=end,proto3" json:"end,omitempty"` + // hints is an opaque data structure that can be used to carry additional information. + // The content of this field and whether it's supported depends on the + // implementation of a specific store. + Hints *types.Any `protobuf:"bytes,5,opt,name=hints,proto3" json:"hints,omitempty"` } func (m *LabelNamesRequest) Reset() { *m = LabelNamesRequest{} } @@ -503,6 +507,10 @@ type LabelValuesRequest struct { PartialResponseStrategy PartialResponseStrategy `protobuf:"varint,3,opt,name=partial_response_strategy,json=partialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partial_response_strategy,omitempty"` Start int64 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,5,opt,name=end,proto3" json:"end,omitempty"` + // hints is an opaque data structure that can be used to carry additional information. + // The content of this field and whether it's supported depends on the + // implementation of a specific store. + Hints *types.Any `protobuf:"bytes,6,opt,name=hints,proto3" json:"hints,omitempty"` } func (m *LabelValuesRequest) Reset() { *m = LabelValuesRequest{} } @@ -598,72 +606,73 @@ func init() { func init() { proto.RegisterFile("store/storepb/rpc.proto", fileDescriptor_a938d55a388af629) } var fileDescriptor_a938d55a388af629 = []byte{ - // 1039 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0x23, 0x45, - 0x13, 0xf6, 0x78, 0xfc, 0x59, 0x4e, 0xf2, 0xce, 0x76, 0x9c, 0xec, 0xc4, 0x2b, 0x39, 0x96, 0xa5, - 0x57, 0xb2, 0xa2, 0xc5, 0x06, 0x83, 0x56, 0x02, 0xed, 0xc5, 0x76, 0x0c, 0x89, 0xd8, 0x38, 0xd0, - 0x8e, 0x37, 0xb0, 0x08, 0x59, 0x63, 0xa7, 0x77, 0x3c, 0x8a, 0xe7, 0x83, 0xe9, 0x36, 0x89, 0xaf, - 0x70, 0x47, 0x88, 0xff, 0x84, 0x94, 0xe3, 0x1e, 0x38, 0x20, 0x0e, 0x2b, 0x48, 0x8e, 0xfc, 0x09, - 0xd4, 0x1f, 0x63, 0x7b, 0x42, 0x76, 0x39, 0x64, 0x2f, 0x56, 0x57, 0x3d, 0x55, 0xdd, 0x4f, 0x3d, - 0x55, 0xdd, 0x1e, 0x78, 0x48, 0x99, 0x1f, 0x92, 0x86, 0xf8, 0x0d, 0x46, 0x8d, 0x30, 0x18, 0xd7, - 0x83, 0xd0, 0x67, 0x3e, 0xca, 0xb0, 0x89, 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, 0x6d, 0x03, 0xb2, 0x95, 0x09, 0x00, 0x00, + // 1045 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x7a, 0xfd, 0xf9, 0x9c, 0x84, 0xed, 0xc4, 0x49, 0x37, 0xae, 0xe4, 0x58, 0x96, 0x90, + 0xac, 0xa8, 0xd8, 0x60, 0x50, 0x25, 0x50, 0x2f, 0x76, 0x62, 0x48, 0x44, 0xe3, 0xc0, 0x38, 0x6e, + 0xa0, 0x08, 0x59, 0x6b, 0x67, 0xba, 0x5e, 0xc5, 0xfb, 0xc1, 0xce, 0x98, 0xc4, 0x37, 0x04, 0x77, + 0x84, 0xb8, 0xf0, 0x17, 0x21, 0xe5, 0xd8, 0x23, 0xe2, 0x50, 0x41, 0xf2, 0x8f, 0xa0, 0xf9, 0x58, + 0xdb, 0x1b, 0xd2, 0xe6, 0x90, 0x5e, 0xac, 0x79, 0xef, 0xf7, 0x3e, 0x7e, 0xf3, 0x7e, 0x33, 0xe3, + 0x85, 0x87, 0x94, 0xf9, 0x21, 0x69, 0x88, 0xdf, 0x60, 0xd8, 0x08, 0x83, 0x51, 0x3d, 0x08, 0x7d, + 0xe6, 0xa3, 0x0c, 0x1b, 0x5b, 0x9e, 0x4f, 0x4b, 0x5b, 0xf1, 0x00, 0x36, 0x0b, 0x08, 0x95, 0x21, + 0xa5, 0xa2, 0xed, 0xdb, 0xbe, 0x58, 0x36, 0xf8, 0x4a, 0x79, 0x2b, 0xf1, 0x84, 0x20, 0xf4, 0xdd, + 0x1b, 0x79, 0xaa, 0xe4, 0xc4, 0x1a, 0x92, 0xc9, 0x4d, 0xc8, 0xf6, 0x7d, 0x7b, 0x42, 0x1a, 0xc2, + 0x1a, 0x4e, 0x5f, 0x36, 0x2c, 0x6f, 0x26, 0xa1, 0xea, 0x7b, 0xb0, 0x7a, 0x12, 0x3a, 0x8c, 0x60, + 0x42, 0x03, 0xdf, 0xa3, 0xa4, 0xfa, 0x8b, 0x06, 0x2b, 0xca, 0xf3, 0xc3, 0x94, 0x50, 0x86, 0x5a, + 0x00, 0xcc, 0x71, 0x09, 0x25, 0xa1, 0x43, 0xa8, 0xa9, 0x55, 0xf4, 0x5a, 0xa1, 0xf9, 0x88, 0x67, + 0xbb, 0x84, 0x8d, 0xc9, 0x94, 0x0e, 0x46, 0x7e, 0x30, 0xab, 0x1f, 0x3b, 0x2e, 0xe9, 0x89, 0x90, + 0x76, 0xea, 0xf2, 0xf5, 0x76, 0x02, 0x2f, 0x25, 0xa1, 0x4d, 0xc8, 0x30, 0xe2, 0x59, 0x1e, 0x33, + 0x93, 0x15, 0xad, 0x96, 0xc7, 0xca, 0x42, 0x26, 0x64, 0x43, 0x12, 0x4c, 0x9c, 0x91, 0x65, 0xea, + 0x15, 0xad, 0xa6, 0xe3, 0xc8, 0xac, 0xae, 0x42, 0xe1, 0xc0, 0x7b, 0xe9, 0x2b, 0x0e, 0xd5, 0xdf, + 0x93, 0xb0, 0x22, 0x6d, 0xc9, 0x12, 0x8d, 0x20, 0x23, 0x36, 0x1a, 0x11, 0x5a, 0xad, 0xcb, 0xc1, + 0xd6, 0x9f, 0x71, 0x6f, 0xfb, 0x29, 0xa7, 0xf0, 0xf7, 0xeb, 0xed, 0x4f, 0x6c, 0x87, 0x8d, 0xa7, + 0xc3, 0xfa, 0xc8, 0x77, 0x1b, 0x32, 0xe0, 0x03, 0xc7, 0x57, 0xab, 0x46, 0x70, 0x66, 0x37, 0x62, + 0x33, 0xab, 0xbf, 0x10, 0xd9, 0x58, 0x95, 0x46, 0x5b, 0x90, 0x73, 0x1d, 0x6f, 0xc0, 0x37, 0x22, + 0x88, 0xeb, 0x38, 0xeb, 0x3a, 0x1e, 0xdf, 0xa9, 0x80, 0xac, 0x0b, 0x09, 0x29, 0xea, 0xae, 0x75, + 0x21, 0xa0, 0x06, 0xe4, 0x45, 0xd5, 0xe3, 0x59, 0x40, 0xcc, 0x54, 0x45, 0xab, 0xad, 0x35, 0x1f, + 0x44, 0xec, 0x7a, 0x11, 0x80, 0x17, 0x31, 0xe8, 0x09, 0x80, 0x68, 0x38, 0xa0, 0x84, 0x51, 0x33, + 0x2d, 0xf6, 0x33, 0xcf, 0x90, 0x94, 0x7a, 0x84, 0xa9, 0xb1, 0xe6, 0x27, 0xca, 0xa6, 0xd5, 0x3f, + 0x75, 0x58, 0x95, 0x23, 0x8f, 0xa4, 0x5a, 0x26, 0xac, 0xbd, 0x99, 0x70, 0x32, 0x4e, 0xf8, 0x09, + 0x87, 0xd8, 0x68, 0x4c, 0x42, 0x6a, 0xea, 0xa2, 0x7b, 0x31, 0x36, 0xcd, 0x43, 0x09, 0x2a, 0x02, + 0xf3, 0x58, 0xd4, 0x84, 0x0d, 0x5e, 0x32, 0x24, 0xd4, 0x9f, 0x4c, 0x99, 0xe3, 0x7b, 0x83, 0x73, + 0xc7, 0x3b, 0xf5, 0xcf, 0xc5, 0xa6, 0x75, 0xbc, 0xee, 0x5a, 0x17, 0x78, 0x8e, 0x9d, 0x08, 0x08, + 0x3d, 0x06, 0xb0, 0x6c, 0x3b, 0x24, 0xb6, 0xc5, 0x88, 0xdc, 0xeb, 0x5a, 0x73, 0x25, 0xea, 0xd6, + 0xb2, 0xed, 0x10, 0x2f, 0xe1, 0xe8, 0x33, 0xd8, 0x0a, 0xac, 0x90, 0x39, 0xd6, 0x84, 0x77, 0x11, + 0xca, 0x0f, 0x4e, 0x1d, 0x6a, 0x0d, 0x27, 0xe4, 0xd4, 0xcc, 0x54, 0xb4, 0x5a, 0x0e, 0x3f, 0x54, + 0x01, 0xd1, 0xc9, 0xd8, 0x53, 0x30, 0xfa, 0xee, 0x96, 0x5c, 0xca, 0x42, 0x8b, 0x11, 0x7b, 0x66, + 0x66, 0x85, 0x2c, 0xdb, 0x51, 0xe3, 0xaf, 0xe2, 0x35, 0x7a, 0x2a, 0xec,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0x4b, 0xc5, 0xb8, 0x53, 0xcd, 0xef, 0x53, 0xc8, + 0xc8, 0xf7, 0x04, 0x6d, 0xc4, 0xdf, 0x97, 0x28, 0x6d, 0xf3, 0xa6, 0x5b, 0x26, 0x7e, 0xa8, 0xa1, + 0x5d, 0x80, 0xc5, 0xfd, 0x40, 0x5b, 0xb1, 0xff, 0x8b, 0xe5, 0x57, 0xa3, 0x54, 0xba, 0x0d, 0x52, + 0xfd, 0x3f, 0x87, 0xc2, 0x92, 0xac, 0x28, 0x1e, 0x1a, 0xbb, 0x04, 0xa5, 0x47, 0xb7, 0x62, 0xb2, + 0x4e, 0xb3, 0x0b, 0x6b, 0xe2, 0x8b, 0x85, 0x9f, 0x6e, 0x39, 0x8c, 0xa7, 0x50, 0xc0, 0xc4, 0xf5, + 0x19, 0x11, 0x7e, 0x34, 0xdf, 0xfe, 0xf2, 0x87, 0x4d, 0x69, 0xe3, 0x86, 0x57, 0x7d, 0x00, 0x25, + 0xda, 0xef, 0x5f, 0xfe, 0x5b, 0x4e, 0x5c, 0x5e, 0x95, 0xb5, 0x57, 0x57, 0x65, 0xed, 0x9f, 0xab, + 0xb2, 0xf6, 0xdb, 0x75, 0x39, 0xf1, 0xea, 0xba, 0x9c, 0xf8, 0xeb, 0xba, 0x9c, 0x78, 0x91, 0x55, + 0xdf, 0x60, 0xc3, 0x8c, 0x38, 0x33, 0x1f, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x7f, 0x4f, + 0x30, 0xed, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1360,6 +1369,18 @@ func (m *LabelNamesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Hints != nil { + { + size, err := m.Hints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if m.End != 0 { i = encodeVarintRpc(dAtA, i, uint64(m.End)) i-- @@ -1461,6 +1482,18 @@ func (m *LabelValuesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Hints != nil { + { + size, err := m.Hints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } if m.End != 0 { i = encodeVarintRpc(dAtA, i, uint64(m.End)) i-- @@ -1738,6 +1771,10 @@ func (m *LabelNamesRequest) Size() (n int) { if m.End != 0 { n += 1 + sovRpc(uint64(m.End)) } + if m.Hints != nil { + l = m.Hints.Size() + n += 1 + l + sovRpc(uint64(l)) + } return n } @@ -1788,6 +1825,10 @@ func (m *LabelValuesRequest) Size() (n int) { if m.End != 0 { n += 1 + sovRpc(uint64(m.End)) } + if m.Hints != nil { + l = m.Hints.Size() + n += 1 + l + sovRpc(uint64(l)) + } return n } @@ -2813,6 +2854,42 @@ func (m *LabelNamesRequest) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hints == nil { + m.Hints = &types.Any{} + } + if err := m.Hints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) @@ -3128,6 +3205,42 @@ func (m *LabelValuesRequest) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hints == nil { + m.Hints = &types.Any{} + } + if err := m.Hints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) diff --git a/pkg/store/storepb/rpc.proto b/pkg/store/storepb/rpc.proto index 29ec5615cc..f1d2f181b7 100644 --- a/pkg/store/storepb/rpc.proto +++ b/pkg/store/storepb/rpc.proto @@ -145,6 +145,11 @@ message LabelNamesRequest { int64 start = 3; int64 end = 4; + + // hints is an opaque data structure that can be used to carry additional information. + // The content of this field and whether it's supported depends on the + // implementation of a specific store. + google.protobuf.Any hints = 5; } message LabelNamesResponse { @@ -168,6 +173,11 @@ message LabelValuesRequest { int64 start = 4; int64 end = 5; + + // hints is an opaque data structure that can be used to carry additional information. + // The content of this field and whether it's supported depends on the + // implementation of a specific store. + google.protobuf.Any hints = 6; } message LabelValuesResponse {