From 773784dae25450ecfa4573ae24c4ce6bda358a42 Mon Sep 17 00:00:00 2001 From: hillium Date: Fri, 16 Aug 2024 16:01:11 +0800 Subject: [PATCH] make epoch repeated Signed-off-by: hillium --- pkg/brpb/brpb.pb.go | 176 ++++++++++++++++++++++---------------------- proto/brpb.proto | 4 +- scripts/proto.lock | 3 +- 3 files changed, 95 insertions(+), 88 deletions(-) diff --git a/pkg/brpb/brpb.pb.go b/pkg/brpb/brpb.pb.go index 06b591011..1d55bfacb 100644 --- a/pkg/brpb/brpb.pb.go +++ b/pkg/brpb/brpb.pb.go @@ -3804,10 +3804,12 @@ type DataFileInfo struct { RegionEndKey []byte `protobuf:"bytes,21,opt,name=region_end_key,json=regionEndKey,proto3" json:"region_end_key,omitempty"` // The region epoch that the log file belongs to. // In older versions, this might be empty. - RegionEpoch *metapb.RegionEpoch `protobuf:"bytes,22,opt,name=region_epoch,json=regionEpoch,proto3" json:"region_epoch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // If a region get split or merged during observing, + // the file may contain multi epoches. + RegionEpoch []*metapb.RegionEpoch `protobuf:"bytes,22,rep,name=region_epoch,json=regionEpoch,proto3" json:"region_epoch,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DataFileInfo) Reset() { *m = DataFileInfo{} } @@ -3990,7 +3992,7 @@ func (m *DataFileInfo) GetRegionEndKey() []byte { return nil } -func (m *DataFileInfo) GetRegionEpoch() *metapb.RegionEpoch { +func (m *DataFileInfo) GetRegionEpoch() []*metapb.RegionEpoch { if m != nil { return m.RegionEpoch } @@ -4821,7 +4823,7 @@ func init() { func init() { proto.RegisterFile("brpb.proto", fileDescriptor_483d1f48d58a4885) } var fileDescriptor_483d1f48d58a4885 = []byte{ - // 4319 bytes of a gzipped FileDescriptorProto + // 4318 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x7a, 0xdd, 0x6f, 0x1c, 0x47, 0x72, 0x38, 0x67, 0xbf, 0xb7, 0xf6, 0x93, 0x43, 0x51, 0x5e, 0xd3, 0x96, 0x44, 0x8f, 0x6c, 0x1d, 0x7f, 0xbc, 0x13, 0xcf, 0x27, 0xf9, 0x74, 0xfe, 0xc5, 0x17, 0x18, 0xfc, 0x92, 0x49, 0x8b, 0x92, @@ -5030,68 +5032,68 @@ var fileDescriptor_483d1f48d58a4885 = []byte{ 0x44, 0x58, 0x78, 0x05, 0x61, 0xbe, 0xe1, 0x5d, 0x57, 0xfe, 0xc1, 0x61, 0x65, 0xee, 0xc1, 0x61, 0x03, 0xba, 0x4a, 0x6b, 0x53, 0xfd, 0xdc, 0x20, 0x25, 0xb4, 0x25, 0xfc, 0x44, 0x6b, 0xe9, 0x7d, 0x68, 0xeb, 0xdb, 0x57, 0xa5, 0xac, 0x55, 0xa2, 0x53, 0x77, 0xb2, 0xfb, 0x52, 0x65, 0x8f, 0xa6, - 0x77, 0xb4, 0x49, 0xec, 0x0d, 0x7b, 0x37, 0x29, 0x8e, 0xae, 0xcc, 0xe6, 0xac, 0x7d, 0x44, 0x65, - 0xd7, 0xb4, 0x34, 0x28, 0x04, 0x13, 0xeb, 0x5b, 0x03, 0x96, 0xf3, 0x57, 0x44, 0xfb, 0x3a, 0x8f, - 0x0f, 0xdd, 0x24, 0x61, 0x91, 0xe3, 0xea, 0xbb, 0xeb, 0x9a, 0x04, 0x6c, 0xd3, 0x9d, 0x2a, 0x65, - 0x49, 0xc7, 0x8b, 0x7d, 0x1d, 0x77, 0xeb, 0x04, 0xd9, 0x8d, 0x7d, 0x4c, 0xb0, 0xf2, 0x4b, 0x1c, - 0x67, 0xc4, 0x38, 0xc7, 0x12, 0x43, 0x26, 0x99, 0x26, 0x01, 0x9f, 0x4a, 0xd8, 0x4c, 0x90, 0xd3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xf6, 0x36, 0x60, 0xed, 0xde, 0xab, 0xc8, 0x32, + 0x6e, 0x7f, 0x0f, 0x4a, 0xdc, 0x9d, 0x30, 0xd3, 0xba, 0x62, 0x46, 0xae, 0xed, 0x5e, 0xbb, 0x7b, + 0x2d, 0x8d, 0x5e, 0x72, 0xe7, 0xde, 0xbf, 0xfd, 0x65, 0xcd, 0xf8, 0xf5, 0x77, 0xb7, 0x8d, 0xdf, + 0x7c, 0x77, 0xdb, 0xf8, 0xf7, 0xef, 0x6e, 0x1b, 0x7f, 0xfe, 0x1f, 0xb7, 0x97, 0xa0, 0x1b, 0xa7, + 0x67, 0x5b, 0x22, 0x38, 0x9f, 0x6c, 0x9d, 0x4f, 0xe8, 0xe3, 0xe8, 0x7e, 0x85, 0x7e, 0x1e, 0xfe, + 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xe1, 0x83, 0x91, 0xa0, 0x2d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8516,19 +8518,21 @@ func (m *DataFileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.RegionEpoch != nil { - { - size, err := m.RegionEpoch.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.RegionEpoch) > 0 { + for iNdEx := len(m.RegionEpoch) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RegionEpoch[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBrpb(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintBrpb(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 } if len(m.RegionEndKey) > 0 { i -= len(m.RegionEndKey) @@ -10741,9 +10745,11 @@ func (m *DataFileInfo) Size() (n int) { if l > 0 { n += 2 + l + sovBrpb(uint64(l)) } - if m.RegionEpoch != nil { - l = m.RegionEpoch.Size() - n += 2 + l + sovBrpb(uint64(l)) + if len(m.RegionEpoch) > 0 { + for _, e := range m.RegionEpoch { + l = e.Size() + n += 2 + l + sovBrpb(uint64(l)) + } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19702,10 +19708,8 @@ func (m *DataFileInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RegionEpoch == nil { - m.RegionEpoch = &metapb.RegionEpoch{} - } - if err := m.RegionEpoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RegionEpoch = append(m.RegionEpoch, &metapb.RegionEpoch{}) + if err := m.RegionEpoch[len(m.RegionEpoch)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/brpb.proto b/proto/brpb.proto index b5bb7756e..9c64a1545 100644 --- a/proto/brpb.proto +++ b/proto/brpb.proto @@ -721,7 +721,9 @@ message DataFileInfo { bytes region_end_key = 21; // The region epoch that the log file belongs to. // In older versions, this might be empty. - metapb.RegionEpoch region_epoch = 22; + // If a region get split or merged during observing, + // the file may contain multi epoches. + repeated metapb.RegionEpoch region_epoch = 22; // It may support encrypting at future. reserved "iv"; diff --git a/scripts/proto.lock b/scripts/proto.lock index 59a406022..c88b06c93 100644 --- a/scripts/proto.lock +++ b/scripts/proto.lock @@ -1626,7 +1626,8 @@ { "id": 22, "name": "region_epoch", - "type": "metapb.RegionEpoch" + "type": "metapb.RegionEpoch", + "is_repeated": true } ], "reserved_names": [