From 7dbc0eadfcaec93f092ae641328bfefce9f45c1a Mon Sep 17 00:00:00 2001 From: alanprot Date: Wed, 5 Nov 2025 10:43:57 -0800 Subject: [PATCH] Making the QueryRequest Releasable Signed-off-by: alanprot --- integration/grpc_server_test.go | 34 +++- pkg/ingester/client/ingester.pb.go | 240 ++++++++++++++++++----------- pkg/ingester/client/ingester.proto | 1 + pkg/ingester/ingester.go | 1 + 4 files changed, 179 insertions(+), 97 deletions(-) diff --git a/integration/grpc_server_test.go b/integration/grpc_server_test.go index 4eab7029d11..736102831b2 100644 --- a/integration/grpc_server_test.go +++ b/integration/grpc_server_test.go @@ -35,6 +35,7 @@ type mockGprcServer struct { func (m mockGprcServer) QueryStream(req *ingester_client.QueryRequest, streamServer ingester_client.Ingester_QueryStreamServer) error { md, _ := metadata.FromIncomingContext(streamServer.Context()) i, _ := strconv.Atoi(md["i"][0]) + defer req.Free() return streamServer.Send(createStreamResponse(i)) } @@ -72,7 +73,7 @@ func (m mockGprcServer) Push(ctx context.Context, request *cortexpb.WriteRequest return &cortexpb.WriteResponse{}, nil } -func run(t *testing.T, cfg server.Config, register func(s *grpc.Server), validate func(t *testing.T, con *grpc.ClientConn)) { +func run(t testing.TB, cfg server.Config, register func(s *grpc.Server), validate func(t testing.TB, con *grpc.ClientConn)) { savedRegistry := prometheus.DefaultRegisterer prometheus.DefaultRegisterer = prometheus.NewRegistry() defer func() { @@ -107,6 +108,7 @@ func run(t *testing.T, cfg server.Config, register func(s *grpc.Server), validat clientConfig := grpcclient.Config{} clientConfig.RegisterFlags(flag.NewFlagSet("fake", flag.ContinueOnError)) + clientConfig.GRPCCompression = "zstd" dialOptions, err := clientConfig.DialOption(nil, nil) assert.NoError(t, err) @@ -117,6 +119,28 @@ func run(t *testing.T, cfg server.Config, register func(s *grpc.Server), validat validate(t, conn) } +func BenchmarkGrpcCalls(b *testing.B) { + cfg := server.Config{} + (&cfg).RegisterFlags(flag.NewFlagSet("fake", flag.ContinueOnError)) + register := func(s *grpc.Server) { + d := &mockGprcServer{} + ingester_client.RegisterIngesterServer(s, d) + } + run(b, cfg, register, func(t testing.TB, conn *grpc.ClientConn) { + ctx := context.Background() + ctx = metadata.NewOutgoingContext(ctx, metadata.MD{"i": []string{strconv.Itoa(0)}}) + client := ingester_client.NewIngesterClient(conn) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + s, err := client.QueryStream(ctx, &ingester_client.QueryRequest{}) + require.NoError(t, err) + _, err = s.Recv() + require.NoError(t, err) + } + }) +} + func TestConcurrentGrpcCalls(t *testing.T) { cfg := server.Config{} (&cfg).RegisterFlags(flag.NewFlagSet("fake", flag.ContinueOnError)) @@ -124,7 +148,7 @@ func TestConcurrentGrpcCalls(t *testing.T) { tc := map[string]struct { cfg server.Config register func(s *grpc.Server) - validate func(t *testing.T, con *grpc.ClientConn) + validate func(t testing.TB, con *grpc.ClientConn) }{ "distributor": { cfg: cfg, @@ -132,7 +156,7 @@ func TestConcurrentGrpcCalls(t *testing.T) { d := &mockGprcServer{} distributorpb.RegisterDistributorServer(s, d) }, - validate: func(t *testing.T, conn *grpc.ClientConn) { + validate: func(t testing.TB, conn *grpc.ClientConn) { client := distributorpb.NewDistributorClient(conn) wg := sync.WaitGroup{} n := 10000 @@ -156,7 +180,7 @@ func TestConcurrentGrpcCalls(t *testing.T) { d := &mockGprcServer{} ingester_client.RegisterIngesterServer(s, d) }, - validate: func(t *testing.T, conn *grpc.ClientConn) { + validate: func(t testing.TB, conn *grpc.ClientConn) { ctx := context.Background() client := ingester_client.NewIngesterClient(conn) wg := sync.WaitGroup{} @@ -188,7 +212,7 @@ func TestConcurrentGrpcCalls(t *testing.T) { d := &mockGprcServer{} ingester_client.RegisterIngesterServer(s, d) }, - validate: func(t *testing.T, conn *grpc.ClientConn) { + validate: func(t testing.TB, conn *grpc.ClientConn) { client := ingester_client.NewIngesterClient(conn) wg := sync.WaitGroup{} n := 10000 diff --git a/pkg/ingester/client/ingester.pb.go b/pkg/ingester/client/ingester.pb.go index cf23254f8d2..6976ae7ed45 100644 --- a/pkg/ingester/client/ingester.pb.go +++ b/pkg/ingester/client/ingester.pb.go @@ -193,9 +193,10 @@ func (m *QueryResponse) GetTimeseries() []cortexpb.TimeSeries { } type QueryRequest struct { - StartTimestampMs int64 `protobuf:"varint,1,opt,name=start_timestamp_ms,json=startTimestampMs,proto3" json:"start_timestamp_ms,omitempty"` - EndTimestampMs int64 `protobuf:"varint,2,opt,name=end_timestamp_ms,json=endTimestampMs,proto3" json:"end_timestamp_ms,omitempty"` - Matchers []*LabelMatcher `protobuf:"bytes,3,rep,name=matchers,proto3" json:"matchers,omitempty"` + StartTimestampMs int64 `protobuf:"varint,1,opt,name=start_timestamp_ms,json=startTimestampMs,proto3" json:"start_timestamp_ms,omitempty"` + EndTimestampMs int64 `protobuf:"varint,2,opt,name=end_timestamp_ms,json=endTimestampMs,proto3" json:"end_timestamp_ms,omitempty"` + Matchers []*LabelMatcher `protobuf:"bytes,3,rep,name=matchers,proto3" json:"matchers,omitempty"` + github_com_cortexproject_cortex_pkg_cortexpb.MessageWithBufRef `protobuf:"bytes,1001,opt,name=Ref,proto3,embedded=Ref,customtype=github.com/cortexproject/cortex/pkg/cortexpb.MessageWithBufRef" json:"Ref"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } @@ -1508,94 +1509,97 @@ func init() { func init() { proto.RegisterFile("ingester.proto", fileDescriptor_60f6df4f3586b478) } var fileDescriptor_60f6df4f3586b478 = []byte{ - // 1386 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x14, 0xc7, - 0x13, 0xdf, 0xf6, 0x3e, 0xd8, 0xad, 0x7d, 0xb0, 0x6e, 0x1b, 0xbc, 0x0c, 0x7f, 0xc6, 0x30, 0x88, - 0x7f, 0xac, 0x24, 0xac, 0xc1, 0x49, 0x24, 0xc8, 0x0b, 0xd9, 0x60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f, 0x71, 0x6a, 0x88, 0x52, 0xae, 0x43, 0x33, 0xa5, 0xc1, 0x1f, 0x02, 0x50, 0xc3, 0x22, 0x7e, - 0x5e, 0x10, 0xee, 0x66, 0x77, 0xc3, 0xb0, 0xc8, 0x3a, 0xd3, 0x2d, 0x95, 0x9e, 0x3c, 0x9f, 0x2d, - 0xa8, 0x09, 0xb4, 0xf2, 0x13, 0x82, 0x46, 0x32, 0x4e, 0xfc, 0x2e, 0x60, 0x9f, 0xea, 0x1e, 0xd5, - 0x18, 0x88, 0xea, 0x96, 0xab, 0x59, 0x81, 0x53, 0x34, 0x57, 0x54, 0xdb, 0x4c, 0xb3, 0x11, 0x2a, - 0x56, 0x7d, 0x3c, 0x07, 0x6d, 0x62, 0xf7, 0xd3, 0xd8, 0x09, 0x86, 0x6d, 0x11, 0xbb, 0x9f, 0x44, - 0x9e, 0x81, 0xaa, 0xa5, 0xd3, 0xde, 0x36, 0xf1, 0xfc, 0x4e, 0x31, 0xcd, 0xd3, 0x0d, 0x7d, 0x93, - 0x98, 0xab, 0x5c, 0xa9, 0x46, 0x28, 0xe5, 0x67, 0x04, 0xd3, 0xcb, 0x8f, 0x88, 0xe5, 0x9a, 0xba, - 0xf7, 0x9f, 0x84, 0x78, 0x76, 0x47, 0x88, 0x87, 0xf2, 0x42, 0xf4, 0x13, 0x31, 0x7e, 0x09, 0x53, - 0x2c, 0xb4, 0x75, 0xea, 0x11, 0xdd, 0x8a, 0x4e, 0xe4, 0x02, 0xd4, 0x7b, 0xdb, 0x03, 0xfb, 0x7e, - 0xea, 0x48, 0x66, 0x42, 0x67, 0xf1, 0x81, 0x5c, 0x0c, 0x40, 0xe2, 0x54, 0x92, 0x16, 0xd7, 0x4a, - 0xd5, 0x89, 0x76, 0x51, 0x59, 0x87, 0x43, 0x19, 0x02, 0xde, 0xc0, 0x89, 0xff, 0x8e, 0x00, 0xb3, - 0x74, 0xee, 0xea, 0xe6, 0x80, 0xf8, 0x21, 0xa9, 0xc7, 0x00, 0xcc, 0x40, 0xaa, 0xd9, 0xba, 0x45, - 0x18, 0x99, 0x35, 0xb5, 0xc6, 0x24, 0x37, 0x75, 0x8b, 0x8c, 0xe0, 0x7c, 0xe2, 0x35, 0x38, 0x2f, - 0xee, 0xc9, 0x79, 0xe9, 0x38, 0x1a, 0x83, 0x73, 0x3c, 0x0d, 0x65, 0xd3, 0xb0, 0x0c, 0xda, 0x29, - 0x33, 0x8f, 0x7c, 0xa1, 0x9c, 0x83, 0xa9, 0x54, 0x56, 0x82, 0xa9, 0x13, 0xd0, 0xe0, 0x69, 0x3d, - 0x64, 0x72, 0xc6, 0x55, 0x4d, 0xad, 0x9b, 0x31, 0x54, 0xf9, 0x14, 0x8e, 0x24, 0x2c, 0x33, 0x27, - 0x39, 0x86, 0xfd, 0x6f, 0x08, 0x26, 0x6f, 0x84, 0x44, 0xf9, 0xfb, 0x5d, 0xa4, 0x51, 0xf6, 0xc5, - 0x44, 0xf6, 0xff, 0x82, 0x46, 0xe5, 0x03, 0x51, 0x06, 0x22, 0x6a, 0x91, 0xef, 0x2c, 0xd4, 0xe3, - 0x32, 0x08, 0xd3, 0x85, 0xa8, 0x0e, 0x7c, 0xe5, 0x23, 0xe8, 0xc4, 0x66, 0x19, 0xb2, 0xf6, 0x34, - 0xc6, 0xd0, 0xbe, 0xe3, 0x13, 0x6f, 0x9d, 0xea, 0x34, 0x24, 0x4a, 0xf9, 0x6e, 0x02, 0x26, 0x13, - 0x42, 0xe1, 0xea, 0x54, 0xf8, 0x9e, 0x1b, 0x8e, 0xad, 0x79, 0x3a, 0xe5, 0x25, 0x89, 0xd4, 0x66, - 0x24, 0x55, 0x75, 0x4a, 0x82, 0xaa, 0xb5, 0x07, 0x96, 0x26, 0x2e, 0x42, 0xc0, 0x58, 0x49, 0xad, - 0xd9, 0x03, 0x8b, 0x57, 0x7f, 0x70, 0x08, 0xba, 0x6b, 0x68, 0x19, 0x4f, 0x45, 0xe6, 0xa9, 0xad, - 0xbb, 0xc6, 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 0xe8, 0xdb, 0xa1, 0x8c, 0x7e, - 0x19, 0xca, 0xe8, 0xc9, 0x50, 0x46, 0x4f, 0x87, 0x32, 0xfa, 0x73, 0x28, 0xa3, 0xbf, 0x86, 0x72, - 0xe1, 0xd5, 0x50, 0x46, 0x3f, 0xbe, 0x94, 0x0b, 0x4f, 0x5f, 0xca, 0x85, 0x67, 0x2f, 0xe5, 0xc2, - 0x17, 0x95, 0x9e, 0x69, 0x10, 0x9b, 0x6e, 0x56, 0xd8, 0xbf, 0x13, 0xef, 0xfd, 0x13, 0x00, 0x00, - 0xff, 0xff, 0xfe, 0x5e, 0xa0, 0x57, 0x08, 0x11, 0x00, 0x00, + // 1439 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x73, 0x13, 0x47, + 0x10, 0xd6, 0xea, 0x65, 0xa9, 0xf5, 0x40, 0x1e, 0x1b, 0x2c, 0x44, 0x58, 0xc1, 0x52, 0x24, 0xaa, + 0x24, 0xc8, 0xe0, 0x24, 0x55, 0x90, 0x07, 0x94, 0x05, 0x06, 0x0c, 0x18, 0xc3, 0xda, 0x40, 0x2a, + 0x95, 0xd4, 0xd6, 0x5a, 0x1a, 0xcb, 0x1b, 0x76, 0xb5, 0xcb, 0xce, 0x88, 0x02, 0x4e, 0x49, 0xe5, + 0x07, 0x24, 0x87, 0xfc, 0x81, 0xdc, 0x72, 0x4d, 0x55, 0x7e, 0x04, 0x47, 0x1f, 0x72, 0xa0, 0x38, + 0xb8, 0x82, 0xb8, 0x24, 0x37, 0xf2, 0x0f, 0x52, 0x3b, 0x33, 0xfb, 0xb4, 0xfc, 0x20, 0x05, 0xb9, + 0x69, 0xbb, 0xbf, 0xe9, 0xe9, 0xfe, 0xe6, 0x9b, 0xe9, 0xb6, 0xa1, 0x6a, 0x0c, 0xfa, 0x98, 0x50, + 0xec, 0xb6, 0x1d, 0xd7, 0xa6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, 0xab, 0x78, 0xd0, 0x8b, 0x22, + 0x4f, 0x43, 0xc1, 0xd2, 0x69, 0x77, 0x03, 0xbb, 0xa4, 0x9e, 0x89, 0xf3, 0x74, 0x43, 0x5f, 0xc3, + 0xe6, 0x12, 0x77, 0xaa, 0x01, 0x0a, 0x3d, 0x81, 0x8c, 0x8a, 0xd7, 0xeb, 0x7f, 0x4f, 0x1c, 0x93, + 0x5a, 0xa5, 0xb9, 0x23, 0x61, 0x41, 0x4b, 0x98, 0x10, 0xbd, 0x8f, 0xef, 0x19, 0x74, 0xa3, 0x33, + 0x5c, 0x57, 0xf1, 0x7a, 0xe7, 0x9a, 0x57, 0xd7, 0xe6, 0x56, 0x53, 0x7a, 0xbe, 0xd5, 0x3c, 0xff, + 0x3a, 0x27, 0xbb, 0x3d, 0x96, 0xea, 0x6d, 0xaa, 0xfc, 0x22, 0xc1, 0xf4, 0xc2, 0x23, 0x6c, 0x39, + 0xa6, 0xee, 0xfe, 0x2f, 0xf4, 0x9c, 0xd9, 0x46, 0xcf, 0xc1, 0x71, 0xf4, 0x90, 0x90, 0x1f, 0xe5, + 0x6b, 0x98, 0x62, 0xa9, 0xad, 0x50, 0x17, 0xeb, 0x56, 0xa0, 0x86, 0x0b, 0x50, 0xea, 0x6e, 0x0c, + 0x07, 0xf7, 0x63, 0x72, 0x98, 0xf1, 0x83, 0x85, 0x62, 0xb8, 0xe8, 0x81, 0x84, 0x22, 0xa2, 0x2b, + 0xae, 0x65, 0x0b, 0xe9, 0x5a, 0x46, 0x59, 0x81, 0x83, 0x09, 0x02, 0xde, 0x80, 0xda, 0xfe, 0x90, + 0x00, 0xb1, 0x72, 0xee, 0xea, 0xe6, 0x10, 0x13, 0x9f, 0xd4, 0xa3, 0x00, 0xa6, 0x67, 0xd5, 0x06, + 0xba, 0x85, 0x19, 0x99, 0x45, 0xb5, 0xc8, 0x2c, 0x37, 0x75, 0x0b, 0xef, 0xc0, 0x79, 0xfa, 0x35, + 0x38, 0xcf, 0xec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e9, 0xaf, 0x91, 0x9c, 0x7a, 0x35, 0x92, 0xa5, 0x9f, 0x5e, 0xca, 0xa9, 0xcd, 0x97, 0x72, + 0xea, 0xd9, 0x4b, 0x39, 0xf5, 0x55, 0xbe, 0x6b, 0x1a, 0x78, 0x40, 0xd7, 0xf2, 0xec, 0x3f, 0x23, + 0x1f, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x76, 0xeb, 0xb3, 0x84, 0x11, 0x00, 0x00, } func (x MatchType) String() string { @@ -1725,6 +1729,9 @@ func (this *QueryRequest) Equal(that interface{}) bool { return false } } + if !this.MessageWithBufRef.Equal(that1.MessageWithBufRef) { + return false + } return true } func (this *ExemplarQueryRequest) Equal(that interface{}) bool { @@ -2488,13 +2495,14 @@ func (this *QueryRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&client.QueryRequest{") s = append(s, "StartTimestampMs: "+fmt.Sprintf("%#v", this.StartTimestampMs)+",\n") s = append(s, "EndTimestampMs: "+fmt.Sprintf("%#v", this.EndTimestampMs)+",\n") if this.Matchers != nil { s = append(s, "Matchers: "+fmt.Sprintf("%#v", this.Matchers)+",\n") } + s = append(s, "MessageWithBufRef: "+fmt.Sprintf("%#v", this.MessageWithBufRef)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -3589,6 +3597,18 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.MessageWithBufRef.Size() + i -= size + if _, err := m.MessageWithBufRef.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintIngester(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xca if len(m.Matchers) > 0 { for iNdEx := len(m.Matchers) - 1; iNdEx >= 0; iNdEx-- { { @@ -4647,6 +4667,8 @@ func (m *QueryRequest) Size() (n int) { n += 1 + l + sovIngester(uint64(l)) } } + l = m.MessageWithBufRef.Size() + n += 2 + l + sovIngester(uint64(l)) return n } @@ -5140,6 +5162,7 @@ func (this *QueryRequest) String() string { `StartTimestampMs:` + fmt.Sprintf("%v", this.StartTimestampMs) + `,`, `EndTimestampMs:` + fmt.Sprintf("%v", this.EndTimestampMs) + `,`, `Matchers:` + repeatedStringForMatchers + `,`, + `MessageWithBufRef:` + fmt.Sprintf("%v", this.MessageWithBufRef) + `,`, `}`, }, "") return s @@ -5824,6 +5847,39 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 1001: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageWithBufRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIngester + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIngester + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIngester + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MessageWithBufRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipIngester(dAtA[iNdEx:]) diff --git a/pkg/ingester/client/ingester.proto b/pkg/ingester/client/ingester.proto index 38b30396734..9a42ebfb3d6 100644 --- a/pkg/ingester/client/ingester.proto +++ b/pkg/ingester/client/ingester.proto @@ -44,6 +44,7 @@ message QueryRequest { int64 start_timestamp_ms = 1; int64 end_timestamp_ms = 2; repeated LabelMatcher matchers = 3; + cortexpb.MessageWithBufRef Ref = 1001 [(gogoproto.embed) = true, (gogoproto.customtype) = "github.com/cortexproject/cortex/pkg/cortexpb.MessageWithBufRef", (gogoproto.nullable) = false]; } message ExemplarQueryRequest { diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 897ab8acc2c..dba17d6f67e 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -2203,6 +2203,7 @@ const queryStreamBatchMessageSize = 1 * 1024 * 1024 // Streams metrics from a TSDB. This implements the client.IngesterServer interface func (i *Ingester) QueryStream(req *client.QueryRequest, stream client.Ingester_QueryStreamServer) (err error) { defer recoverIngester(i.logger, &err) + defer req.Free() if err = i.checkRunning(); err != nil { return err