diff --git a/pkg/coprocessor/coprocessor.pb.go b/pkg/coprocessor/coprocessor.pb.go index 426171939..cd663b474 100644 --- a/pkg/coprocessor/coprocessor.pb.go +++ b/pkg/coprocessor/coprocessor.pb.go @@ -101,6 +101,8 @@ type Request struct { ConnectionId uint64 `protobuf:"varint,12,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` ConnectionAlias string `protobuf:"bytes,13,opt,name=connection_alias,json=connectionAlias,proto3" json:"connection_alias,omitempty"` TableShardInfos []*TableShardInfos `protobuf:"bytes,14,rep,name=table_shard_infos,json=tableShardInfos,proto3" json:"table_shard_infos,omitempty"` + // versions of each range, used in TiCI lookup, if range_versions is set, then len(range_versions) should equal to len(ranges), and all the range in ranges should be point range + RangeVersions []uint64 `protobuf:"varint,15,rep,packed,name=range_versions,json=rangeVersions,proto3" json:"range_versions,omitempty"` } func (m *Request) Reset() { *m = Request{} } @@ -234,6 +236,13 @@ func (m *Request) GetTableShardInfos() []*TableShardInfos { return nil } +func (m *Request) GetRangeVersions() []uint64 { + if m != nil { + return m.RangeVersions + } + return nil +} + type Response struct { Data github_com_pingcap_kvproto_pkg_sharedbytes.SharedBytes `protobuf:"bytes,1,opt,name=data,proto3,customtype=github.com/pingcap/kvproto/pkg/sharedbytes.SharedBytes" json:"data"` RegionError *errorpb.Error `protobuf:"bytes,2,opt,name=region_error,json=regionError,proto3" json:"region_error,omitempty"` @@ -793,6 +802,8 @@ type StoreBatchTask struct { Peer *metapb.Peer `protobuf:"bytes,3,opt,name=peer,proto3" json:"peer,omitempty"` Ranges []*KeyRange `protobuf:"bytes,4,rep,name=ranges,proto3" json:"ranges,omitempty"` TaskId uint64 `protobuf:"varint,5,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // versions of each range, used in TiCI lookup, if range_versions is set, then len(range_versions) should equal to len(ranges), and all the range in ranges should be point range + RangeVersions []uint64 `protobuf:"varint,6,rep,packed,name=range_versions,json=rangeVersions,proto3" json:"range_versions,omitempty"` } func (m *StoreBatchTask) Reset() { *m = StoreBatchTask{} } @@ -863,6 +874,13 @@ func (m *StoreBatchTask) GetTaskId() uint64 { return 0 } +func (m *StoreBatchTask) GetRangeVersions() []uint64 { + if m != nil { + return m.RangeVersions + } + return nil +} + type StoreBatchTaskResponse struct { Data github_com_pingcap_kvproto_pkg_sharedbytes.SharedBytes `protobuf:"bytes,1,opt,name=data,proto3,customtype=github.com/pingcap/kvproto/pkg/sharedbytes.SharedBytes" json:"data"` RegionError *errorpb.Error `protobuf:"bytes,2,opt,name=region_error,json=regionError,proto3" json:"region_error,omitempty"` @@ -1124,88 +1142,90 @@ func init() { func init() { proto.RegisterFile("coprocessor.proto", fileDescriptor_29878c170c3dd019) } var fileDescriptor_29878c170c3dd019 = []byte{ - // 1291 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcd, 0x6e, 0x14, 0x47, - 0x10, 0xf6, 0xfe, 0xef, 0xd6, 0xcc, 0xfe, 0xb8, 0x31, 0x66, 0x80, 0x64, 0x59, 0x2d, 0x39, 0x18, - 0x48, 0xd6, 0x62, 0x89, 0x40, 0xb9, 0x20, 0x65, 0xc1, 0x12, 0x9b, 0x10, 0x29, 0x6a, 0x5b, 0x5c, - 0x47, 0xbd, 0x33, 0xcd, 0xec, 0x68, 0x77, 0x67, 0x26, 0xd3, 0x6d, 0x0b, 0x73, 0xe3, 0x0d, 0x38, - 0xe6, 0x11, 0x72, 0xc9, 0x03, 0x44, 0xca, 0x31, 0x07, 0x6e, 0xe1, 0x88, 0x72, 0x40, 0x91, 0xfd, - 0x22, 0x51, 0x57, 0x4f, 0xef, 0x8f, 0x6d, 0x90, 0x8d, 0xc4, 0x25, 0xa7, 0xed, 0xfa, 0xe9, 0xaa, - 0xea, 0xaa, 0xaf, 0xaa, 0x66, 0x61, 0xdd, 0x8b, 0x93, 0x34, 0xf6, 0xb8, 0x10, 0x71, 0x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50, 0x35, 0xe6, 0xb2, 0x7f, 0x39, 0x73, 0xfa, 0x14, 0x26, 0x0a, 0x17, 0xc1, 0x44, 0xf1, - 0x82, 0x98, 0x28, 0x9d, 0xc2, 0xc4, 0xd9, 0x09, 0x2b, 0x9f, 0x9d, 0xb0, 0x41, 0xff, 0xdd, 0x6f, - 0xd5, 0xdc, 0x9b, 0xa3, 0x76, 0xee, 0xed, 0x51, 0x3b, 0xf7, 0xef, 0x51, 0x3b, 0xf7, 0xfa, 0xb8, - 0xbd, 0xf6, 0xeb, 0x71, 0x7b, 0xed, 0xed, 0x71, 0x7b, 0xed, 0xdd, 0x71, 0x7b, 0x0d, 0x5a, 0x71, - 0x1a, 0xf4, 0x64, 0x38, 0x39, 0xe8, 0x65, 0x6d, 0x31, 0x2a, 0xe3, 0xcf, 0xbd, 0xff, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x1c, 0x19, 0x81, 0xd9, 0x7b, 0x0e, 0x00, 0x00, + // 1318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcd, 0x8e, 0x13, 0xc7, + 0x13, 0x5f, 0x7f, 0xdb, 0x35, 0xfe, 0xda, 0x66, 0x59, 0x06, 0xf8, 0xff, 0x8d, 0x65, 0x12, 0xc9, + 0x40, 0xe2, 0x15, 0x26, 0x02, 0xe5, 0x82, 0x14, 0xc3, 0x4a, 0x38, 0x21, 0x52, 0xd4, 0xbb, 0xe2, + 0x3a, 0x6a, 0xcf, 0x34, 0xe3, 0x91, 0xed, 0x99, 0xc9, 0x74, 0xef, 0x8a, 0xe5, 0xc6, 0x1b, 0x70, + 0xcc, 0x23, 0xe4, 0x92, 0x37, 0xc8, 0x31, 0x07, 0x8e, 0x1c, 0x51, 0x0e, 0x08, 0xed, 0xbe, 0x43, + 0xce, 0x51, 0x57, 0x4f, 0xfb, 0x63, 0xd7, 0xa0, 0x5d, 0x24, 0x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0x4a, 0xa4, 0x0b, 0xcd, 0x40, 0x38, 0x2e, 0x73, 0xc7, 0xdc, 0xe1, 0x21, 0x1b, 0x4d, + 0xb9, 0x67, 0x17, 0xda, 0x99, 0x6e, 0x99, 0xd6, 0x03, 0xf1, 0x48, 0xb1, 0x77, 0x35, 0x97, 0xdc, + 0x83, 0x6d, 0xad, 0x16, 0x3c, 0x77, 0x66, 0x4c, 0xba, 0x63, 0xe7, 0x90, 0x27, 0x22, 0x88, 0x42, + 0xbb, 0x88, 0x11, 0x5c, 0x42, 0xe9, 0xf0, 0xf9, 0xcf, 0x4a, 0xf6, 0x4c, 0x8b, 0xc8, 0xff, 0x01, + 0x84, 0x3b, 0xe6, 0x33, 0xa6, 0x94, 0xed, 0x32, 0x5e, 0xaa, 0xa2, 0x39, 0xcf, 0x78, 0x92, 0x7a, + 0x97, 0x09, 0x73, 0x17, 0xde, 0x2b, 0xc6, 0xfb, 0xbe, 0x62, 0x1b, 0xef, 0x37, 0xc0, 0x8a, 0x99, + 0x1f, 0x84, 0xbe, 0x23, 0x82, 0x97, 0xdc, 0x06, 0x74, 0x09, 0x9a, 0xb5, 0x17, 0xbc, 0xe4, 0xe4, + 0x2e, 0x14, 0x24, 0x13, 0x13, 0x61, 0x5b, 0x78, 0xed, 0xeb, 0x2b, 0xd7, 0xde, 0x93, 0x51, 0xc2, + 0x07, 0x2a, 0xb0, 0x7d, 0x26, 0x26, 0x54, 0x6b, 0x92, 0x9b, 0x50, 0x73, 0xa3, 0x30, 0xe4, 0xae, + 0x0c, 0xa2, 0xd0, 0x09, 0x3c, 0xbb, 0x8a, 0x56, 0xab, 0x0b, 0xe6, 0xd0, 0x23, 0xb7, 0xa0, 0xb9, + 0xa4, 0xc4, 0xa6, 0x01, 0x13, 0x76, 0xad, 0x9d, 0xe9, 0x56, 0x68, 0x63, 0xc1, 0xff, 0x41, 0xb1, + 0xc9, 0x13, 0xd8, 0x94, 0x2a, 0x5a, 0x47, 0x8c, 0x59, 0xe2, 0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 0x3e, 0xb9, 0x03, 0x9b, 0x22, 0x64, 0xb1, 0x18, 0x47, 0x72, 0xa1, 0xac, + 0x53, 0xd3, 0x34, 0x02, 0xa3, 0xdc, 0x79, 0x95, 0x85, 0xe6, 0xe2, 0x92, 0x29, 0x4a, 0xbe, 0x82, + 0xfa, 0xc2, 0xdf, 0x02, 0x2f, 0xb4, 0x6a, 0x7c, 0x3d, 0x56, 0x75, 0xbf, 0x06, 0x65, 0x63, 0x2e, + 0xfd, 0xcf, 0x34, 0xa7, 0xcf, 0x60, 0x22, 0x77, 0x11, 0x4c, 0xe4, 0x2f, 0x88, 0x89, 0xc2, 0x19, + 0x4c, 0xac, 0x4f, 0x58, 0x71, 0x7d, 0xc2, 0x06, 0xfd, 0x77, 0xbf, 0x97, 0x33, 0x6f, 0x8e, 0x5b, + 0x99, 0xb7, 0xc7, 0xad, 0xcc, 0x87, 0xe3, 0x56, 0xe6, 0xf5, 0x49, 0x6b, 0xe3, 0xb7, 0x93, 0xd6, + 0xc6, 0xdb, 0x93, 0xd6, 0xc6, 0xbb, 0x93, 0xd6, 0x06, 0x34, 0xa3, 0xc4, 0xef, 0xc9, 0x60, 0x72, + 0xd8, 0x4b, 0xdb, 0x62, 0x54, 0xc4, 0x9f, 0x7b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x2d, + 0xfd, 0xcd, 0xc9, 0x0e, 0x00, 0x00, } func (m *KeyRange) Marshal() (dAtA []byte, err error) { @@ -1265,6 +1285,24 @@ func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RangeVersions) > 0 { + dAtA2 := make([]byte, len(m.RangeVersions)*10) + var j1 int + for _, num := range m.RangeVersions { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintCoprocessor(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x7a + } if len(m.TableShardInfos) > 0 { for iNdEx := len(m.TableShardInfos) - 1; iNdEx >= 0; iNdEx-- { { @@ -1935,6 +1973,24 @@ func (m *StoreBatchTask) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RangeVersions) > 0 { + dAtA13 := make([]byte, len(m.RangeVersions)*10) + var j12 int + for _, num := range m.RangeVersions { + for num >= 1<<7 { + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j12++ + } + dAtA13[j12] = uint8(num) + j12++ + } + i -= j12 + copy(dAtA[i:], dAtA13[:j12]) + i = encodeVarintCoprocessor(dAtA, i, uint64(j12)) + i-- + dAtA[i] = 0x32 + } if m.TaskId != 0 { i = encodeVarintCoprocessor(dAtA, i, uint64(m.TaskId)) i-- @@ -2292,6 +2348,13 @@ func (m *Request) Size() (n int) { n += 1 + l + sovCoprocessor(uint64(l)) } } + if len(m.RangeVersions) > 0 { + l = 0 + for _, e := range m.RangeVersions { + l += sovCoprocessor(uint64(e)) + } + n += 1 + sovCoprocessor(uint64(l)) + l + } return n } @@ -2540,6 +2603,13 @@ func (m *StoreBatchTask) Size() (n int) { if m.TaskId != 0 { n += 1 + sovCoprocessor(uint64(m.TaskId)) } + if len(m.RangeVersions) > 0 { + l = 0 + for _, e := range m.RangeVersions { + l += sovCoprocessor(uint64(e)) + } + n += 1 + sovCoprocessor(uint64(l)) + l + } return n } @@ -3144,6 +3214,82 @@ func (m *Request) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 15: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoprocessor + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RangeVersions = append(m.RangeVersions, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoprocessor + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthCoprocessor + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthCoprocessor + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.RangeVersions) == 0 { + m.RangeVersions = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoprocessor + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RangeVersions = append(m.RangeVersions, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field RangeVersions", wireType) + } default: iNdEx = preIndex skippy, err := skipCoprocessor(dAtA[iNdEx:]) @@ -4806,6 +4952,82 @@ func (m *StoreBatchTask) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoprocessor + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RangeVersions = append(m.RangeVersions, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoprocessor + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthCoprocessor + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthCoprocessor + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.RangeVersions) == 0 { + m.RangeVersions = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoprocessor + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RangeVersions = append(m.RangeVersions, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field RangeVersions", wireType) + } default: iNdEx = preIndex skippy, err := skipCoprocessor(dAtA[iNdEx:]) diff --git a/proto/coprocessor.proto b/proto/coprocessor.proto index 7973f186e..5137bc0f8 100644 --- a/proto/coprocessor.proto +++ b/proto/coprocessor.proto @@ -47,6 +47,8 @@ message Request { string connection_alias = 13; // This is the session alias between a client and tidb repeated TableShardInfos table_shard_infos= 14; // Shard infos for FTS index, used by TiFlash reading TiCI. + // versions of each range, used in TiCI lookup, if range_versions is set, then len(range_versions) should equal to len(ranges), and all the range in ranges should be point range + repeated uint64 range_versions = 15; } message Response { @@ -131,6 +133,8 @@ message StoreBatchTask { metapb.Peer peer = 3; repeated KeyRange ranges = 4; uint64 task_id = 5; + // versions of each range, used in TiCI lookup, if range_versions is set, then len(range_versions) should equal to len(ranges), and all the range in ranges should be point range + repeated uint64 range_versions = 6; } message StoreBatchTaskResponse { diff --git a/scripts/proto.lock b/scripts/proto.lock index b5bf135ef..e80d41b4c 100644 --- a/scripts/proto.lock +++ b/scripts/proto.lock @@ -3404,6 +3404,12 @@ "name": "table_shard_infos", "type": "TableShardInfos", "is_repeated": true + }, + { + "id": 15, + "name": "range_versions", + "type": "uint64", + "is_repeated": true } ] }, @@ -3693,6 +3699,12 @@ "id": 5, "name": "task_id", "type": "uint64" + }, + { + "id": 6, + "name": "range_versions", + "type": "uint64", + "is_repeated": true } ] },