From 04bef527513dfede3b50e7260a45b78db25d0891 Mon Sep 17 00:00:00 2001 From: iosmanthus Date: Sat, 11 Mar 2023 00:28:56 +0800 Subject: [PATCH] add api_version for mpp task meta Signed-off-by: iosmanthus --- pkg/mpp/mpp.pb.go | 160 ++++++++++++++++++++++++++++----------------- proto/mpp.proto | 2 + scripts/proto.lock | 8 +++ 3 files changed, 110 insertions(+), 60 deletions(-) diff --git a/pkg/mpp/mpp.pb.go b/pkg/mpp/mpp.pb.go index fdf5f667c..305e339d6 100644 --- a/pkg/mpp/mpp.pb.go +++ b/pkg/mpp/mpp.pb.go @@ -12,6 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" coprocessor "github.com/pingcap/kvproto/pkg/coprocessor" + kvrpcpb "github.com/pingcap/kvproto/pkg/kvrpcpb" metapb "github.com/pingcap/kvproto/pkg/metapb" ) @@ -28,19 +29,20 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // TaskMeta contains meta of a mpp plan, including query's ts and task address. type TaskMeta struct { - StartTs uint64 `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` - TaskId int64 `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - PartitionId int64 `protobuf:"varint,3,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - GatherId uint64 `protobuf:"varint,5,opt,name=gather_id,json=gatherId,proto3" json:"gather_id,omitempty"` - QueryTs uint64 `protobuf:"varint,6,opt,name=query_ts,json=queryTs,proto3" json:"query_ts,omitempty"` - LocalQueryId uint64 `protobuf:"varint,7,opt,name=local_query_id,json=localQueryId,proto3" json:"local_query_id,omitempty"` - ServerId uint64 `protobuf:"varint,8,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` - MppVersion int64 `protobuf:"varint,9,opt,name=mpp_version,json=mppVersion,proto3" json:"mpp_version,omitempty"` - KeyspaceId uint32 `protobuf:"varint,10,opt,name=keyspace_id,json=keyspaceId,proto3" json:"keyspace_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + StartTs uint64 `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` + TaskId int64 `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + PartitionId int64 `protobuf:"varint,3,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + GatherId uint64 `protobuf:"varint,5,opt,name=gather_id,json=gatherId,proto3" json:"gather_id,omitempty"` + QueryTs uint64 `protobuf:"varint,6,opt,name=query_ts,json=queryTs,proto3" json:"query_ts,omitempty"` + LocalQueryId uint64 `protobuf:"varint,7,opt,name=local_query_id,json=localQueryId,proto3" json:"local_query_id,omitempty"` + ServerId uint64 `protobuf:"varint,8,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` + MppVersion int64 `protobuf:"varint,9,opt,name=mpp_version,json=mppVersion,proto3" json:"mpp_version,omitempty"` + KeyspaceId uint32 `protobuf:"varint,10,opt,name=keyspace_id,json=keyspaceId,proto3" json:"keyspace_id,omitempty"` + ApiVersion kvrpcpb.APIVersion `protobuf:"varint,16,opt,name=api_version,json=apiVersion,proto3,enum=kvrpcpb.APIVersion" json:"api_version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TaskMeta) Reset() { *m = TaskMeta{} } @@ -146,6 +148,13 @@ func (m *TaskMeta) GetKeyspaceId() uint32 { return 0 } +func (m *TaskMeta) GetApiVersion() kvrpcpb.APIVersion { + if m != nil { + return m.ApiVersion + } + return kvrpcpb.APIVersion_V1 +} + type IsAliveRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -705,53 +714,55 @@ func init() { func init() { proto.RegisterFile("mpp.proto", fileDescriptor_819623c7fa76fc55) } var fileDescriptor_819623c7fa76fc55 = []byte{ - // 724 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xdb, 0x38, - 0x10, 0x5e, 0x59, 0xfe, 0xd3, 0x58, 0xce, 0x26, 0xdc, 0x60, 0xe3, 0x64, 0x37, 0x5e, 0x47, 0xd8, - 0x83, 0x4f, 0x5e, 0x6c, 0x02, 0xec, 0x71, 0x81, 0xdd, 0x24, 0x07, 0x1d, 0x52, 0xb8, 0x84, 0x11, - 0xf4, 0x26, 0x30, 0x22, 0x6b, 0x0b, 0x96, 0x44, 0x86, 0xa4, 0x0d, 0xe4, 0xdc, 0x43, 0xdf, 0xa0, - 0xe8, 0xa3, 0xf4, 0x11, 0x7a, 0xec, 0x23, 0x14, 0xe9, 0x8b, 0x14, 0x24, 0x25, 0x37, 0x31, 0x1a, - 0xb4, 0x3d, 0x89, 0xdf, 0x37, 0xc3, 0x99, 0x8f, 0xf3, 0x23, 0x08, 0x0a, 0x21, 0x26, 0x42, 0x72, - 0xcd, 0x91, 0x5f, 0x08, 0x71, 0xb4, 0x3f, 0xe7, 0x73, 0x6e, 0xf1, 0x5f, 0xe6, 0xe4, 0x4c, 0x47, - 0x7b, 0xa9, 0xe1, 0x52, 0xa6, 0x14, 0x97, 0x15, 0x15, 0x16, 0x4c, 0x13, 0x71, 0xe3, 0x50, 0xf4, - 0xae, 0x01, 0xdd, 0x19, 0x51, 0xcb, 0x2b, 0xa6, 0x09, 0x3a, 0x84, 0xae, 0xd2, 0x44, 0xea, 0x44, - 0xab, 0x81, 0x37, 0xf2, 0xc6, 0x4d, 0xdc, 0xb1, 0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3a, 0x5b, 0xae, 0x27, 0xcb, 0xb5, 0xfd, - 0x79, 0xde, 0xb4, 0xed, 0xe7, 0xec, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0xfd, 0x7e, 0xdc, - 0x8c, 0x05, 0x00, 0x00, + // 756 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x8f, 0x1b, 0x35, + 0x14, 0x67, 0x32, 0xd9, 0x24, 0xf3, 0x32, 0x59, 0xb6, 0x6e, 0x45, 0xd3, 0x42, 0x97, 0x74, 0xc4, + 0x21, 0xa7, 0x41, 0xa4, 0x88, 0x23, 0x52, 0x69, 0x7b, 0x98, 0xc3, 0xa2, 0xc1, 0x8a, 0x2a, 0x6e, + 0x23, 0xef, 0xd8, 0x24, 0xd6, 0xfc, 0xb1, 0x6b, 0x3b, 0x23, 0xed, 0x99, 0x03, 0xdf, 0x00, 0xf1, + 0x91, 0x38, 0xf2, 0x11, 0xd0, 0x72, 0xe7, 0x33, 0x20, 0xdb, 0x33, 0x61, 0x1b, 0xb1, 0x02, 0x4e, + 0xf1, 0xef, 0xf7, 0x9e, 0x7f, 0xef, 0x37, 0xef, 0x3d, 0x07, 0xa2, 0x46, 0xca, 0x54, 0x2a, 0x61, + 0x04, 0x0a, 0x1b, 0x29, 0x9f, 0x3e, 0xda, 0x89, 0x9d, 0x70, 0xf8, 0x73, 0x7b, 0xf2, 0xa1, 0xa7, + 0x0f, 0x4a, 0xcb, 0x95, 0x4c, 0x6b, 0xa1, 0x7a, 0x2a, 0x6e, 0x98, 0x21, 0xf2, 0xba, 0x47, 0x8b, + 0xaa, 0x53, 0xb2, 0x1c, 0x60, 0xf2, 0xe7, 0x08, 0x66, 0x5b, 0xa2, 0xab, 0x2b, 0x66, 0x08, 0x7a, + 0x02, 0x33, 0x6d, 0x88, 0x32, 0x85, 0xd1, 0xcb, 0x60, 0x15, 0xac, 0xc7, 0x78, 0xea, 0xf0, 0x56, + 0xa3, 0xc7, 0x30, 0x35, 0x44, 0x57, 0x05, 0xa7, 0xcb, 0xd1, 0x2a, 0x58, 0x87, 0x78, 0x62, 0x61, + 0x46, 0xd1, 0x73, 0x88, 0x25, 0x51, 0x86, 0x1b, 0x2e, 0x5a, 0x1b, 0x0d, 0x5d, 0x74, 0x7e, 0xe4, + 0x32, 0x8a, 0x96, 0x30, 0x25, 0x94, 0x2a, 0xa6, 0xf5, 0x72, 0xbc, 0x0a, 0xd6, 0x11, 0x1e, 0x20, + 0xfa, 0x18, 0xa2, 0x1d, 0x31, 0x7b, 0xa6, 0xec, 0xcd, 0x33, 0x57, 0x71, 0xe6, 0x89, 0x8c, 0x5a, + 0x37, 0xef, 0x0e, 0x4c, 0xdd, 0x58, 0x37, 0x13, 0xef, 0xc6, 0xe1, 0xad, 0x46, 0x9f, 0xc1, 0x79, + 0x2d, 0x4a, 0x52, 0x17, 0x3e, 0x81, 0xd3, 0xe5, 0xd4, 0x25, 0xc4, 0x8e, 0xfd, 0xce, 0x92, 0x19, + 0xb5, 0xea, 0x9a, 0xa9, 0xce, 0xab, 0xcf, 0xbc, 0xba, 0x27, 0x32, 0x8a, 0x3e, 0x85, 0x79, 0x23, + 0x65, 0xd1, 0x31, 0xa5, 0xb9, 0x68, 0x97, 0x91, 0xb3, 0x0d, 0x8d, 0x94, 0x6f, 0x3d, 0x63, 0x13, + 0x2a, 0x76, 0xa3, 0x25, 0x29, 0x99, 0xbd, 0x0f, 0xab, 0x60, 0xbd, 0xc0, 0x30, 0x50, 0x19, 0x45, + 0x5f, 0xc2, 0x9c, 0x48, 0x7e, 0x54, 0xb8, 0x58, 0x05, 0xeb, 0xf3, 0xcd, 0xc3, 0x74, 0xe8, 0xef, + 0xcb, 0x3c, 0xeb, 0xa5, 0x30, 0x10, 0xc9, 0xfb, 0x73, 0x72, 0x01, 0xe7, 0x99, 0x7e, 0x59, 0xf3, + 0x8e, 0x61, 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xd3, 0x97, 0x17, + 0x9e, 0xbe, 0xbc, 0x6f, 0x92, 0x5f, 0x6f, 0x2f, 0x83, 0xdf, 0x6e, 0x2f, 0x83, 0xdf, 0x6f, 0x2f, + 0x83, 0x5f, 0xfe, 0xb8, 0xfc, 0x00, 0x2e, 0x84, 0xda, 0xa5, 0x86, 0x57, 0x5d, 0x5a, 0x75, 0xee, + 0x2f, 0xf7, 0x7a, 0xe2, 0x7e, 0x5e, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x42, 0x9d, 0x16, + 0xd1, 0x05, 0x00, 0x00, } func (m *TaskMeta) Marshal() (dAtA []byte, err error) { @@ -778,6 +789,13 @@ func (m *TaskMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.ApiVersion != 0 { + i = encodeVarintMpp(dAtA, i, uint64(m.ApiVersion)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } if m.KeyspaceId != 0 { i = encodeVarintMpp(dAtA, i, uint64(m.KeyspaceId)) i-- @@ -1350,6 +1368,9 @@ func (m *TaskMeta) Size() (n int) { if m.KeyspaceId != 0 { n += 1 + sovMpp(uint64(m.KeyspaceId)) } + if m.ApiVersion != 0 { + n += 2 + sovMpp(uint64(m.ApiVersion)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -1798,6 +1819,25 @@ func (m *TaskMeta) Unmarshal(dAtA []byte) error { break } } + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ApiVersion", wireType) + } + m.ApiVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMpp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ApiVersion |= kvrpcpb.APIVersion(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipMpp(dAtA[iNdEx:]) diff --git a/proto/mpp.proto b/proto/mpp.proto index d14f6947a..ca5c8ad89 100644 --- a/proto/mpp.proto +++ b/proto/mpp.proto @@ -4,6 +4,7 @@ package mpp; import "gogoproto/gogo.proto"; import "coprocessor.proto"; import "metapb.proto"; +import "kvrpcpb.proto"; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; @@ -23,6 +24,7 @@ message TaskMeta { uint64 server_id = 8; // TiDB server id int64 mpp_version = 9; // mpp version uint32 keyspace_id = 10; // keyspace id of the request + kvrpcpb.APIVersion api_version = 16; // API version of the request } message IsAliveRequest { diff --git a/scripts/proto.lock b/scripts/proto.lock index 93e87193b..5f0e5c58f 100644 --- a/scripts/proto.lock +++ b/scripts/proto.lock @@ -11268,6 +11268,11 @@ "id": 10, "name": "keyspace_id", "type": "uint32" + }, + { + "id": 16, + "name": "api_version", + "type": "kvrpcpb.APIVersion" } ] }, @@ -11444,6 +11449,9 @@ }, { "path": "metapb.proto" + }, + { + "path": "kvrpcpb.proto" } ], "package": {