feat(clustermgr): rename shard epoch to routeVersion

. #22416534

Signed-off-by: tangdeyi <tangdeyi@oppo.com>
This commit is contained in:
tangdeyi 2024-08-14 12:43:37 +08:00 committed by slasher
parent 9107c71b36
commit d9d0d004bc
13 changed files with 1141 additions and 332 deletions

View File

@ -6,7 +6,10 @@ import (
"crypto/md5"
"encoding/base64"
"encoding/binary"
"fmt"
"time"
"github.com/cubefs/cubefs/blobstore/common/rpc"
)
const (
@ -26,7 +29,12 @@ func (c *Client) GetSpace(ctx context.Context, args *GetSpaceArgs) (ret *Space,
}
func (c *Client) AuthSpace(ctx context.Context, args *AuthSpaceArgs) (err error) {
err = c.PostWith(ctx, "/space/auth", nil, args)
err = c.GetWith(ctx, fmt.Sprintf("/space/auth?name=%s&token=%s", args.Name, args.Token), nil)
return
}
func (c *Client) ListSpace(ctx context.Context, args *ListSpaceArgs) (ret ListSpaceRet, err error) {
err = c.GetWith(ctx, fmt.Sprintf("/space/list?marker=%d&count=%d", args.Marker, args.Count), &ret)
return
}
@ -89,6 +97,15 @@ func CalculateHash(auth *AuthInfo, timeStamp int64) (hashBytes []byte) {
return hashBytes
}
type GetCatalogChangesRet struct {
GetCatalogChanges
}
func (args *GetCatalogChangesRet) Marshal() ([]byte, string, error) {
raw, err := args.GetCatalogChanges.Marshal()
return raw, rpc.MIMEStream, err
}
func (c *Client) GetCatalogChanges(ctx context.Context, args *GetCatalogChangesArgs) (ret *GetCatalogChangesRet, err error) {
ret = &GetCatalogChangesRet{}
err = c.PostWith(ctx, "/catalogchanges/get", ret, args)

View File

@ -341,12 +341,12 @@ func (m *AuthSpaceArgs) GetToken() string {
}
type CatalogChangeShardAdd struct {
ShardID github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"shard_id,omitempty"`
Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
Units []ShardUnitInfo `protobuf:"bytes,3,rep,name=units,proto3" json:"units"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
ShardID github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"shard_id,omitempty"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,2,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
Units []ShardUnitInfo `protobuf:"bytes,3,rep,name=units,proto3" json:"units"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CatalogChangeShardAdd) Reset() { *m = CatalogChangeShardAdd{} }
@ -389,9 +389,9 @@ func (m *CatalogChangeShardAdd) GetShardID() github_com_cubefs_cubefs_blobstore_
return 0
}
func (m *CatalogChangeShardAdd) GetEpoch() uint64 {
func (m *CatalogChangeShardAdd) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.Epoch
return m.RouteVersion
}
return 0
}
@ -404,12 +404,12 @@ func (m *CatalogChangeShardAdd) GetUnits() []ShardUnitInfo {
}
type CatalogChangeShardUpdate struct {
ShardID github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"shard_id,omitempty"`
Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
Unit ShardUnitInfo `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
ShardID github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"shard_id,omitempty"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,2,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
Unit ShardUnitInfo `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CatalogChangeShardUpdate) Reset() { *m = CatalogChangeShardUpdate{} }
@ -452,9 +452,9 @@ func (m *CatalogChangeShardUpdate) GetShardID() github_com_cubefs_cubefs_blobsto
return 0
}
func (m *CatalogChangeShardUpdate) GetEpoch() uint64 {
func (m *CatalogChangeShardUpdate) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.Epoch
return m.RouteVersion
}
return 0
}
@ -584,7 +584,7 @@ func (m *GetCatalogChangesArgs) GetNodeID() github_com_cubefs_cubefs_blobstore_c
return 0
}
type GetCatalogChangesRet struct {
type GetCatalogChanges struct {
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,1,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
Items []CatalogChangeItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -592,18 +592,18 @@ type GetCatalogChangesRet struct {
XXX_sizecache int32 `json:"-"`
}
func (m *GetCatalogChangesRet) Reset() { *m = GetCatalogChangesRet{} }
func (m *GetCatalogChangesRet) String() string { return proto.CompactTextString(m) }
func (*GetCatalogChangesRet) ProtoMessage() {}
func (*GetCatalogChangesRet) Descriptor() ([]byte, []int) {
func (m *GetCatalogChanges) Reset() { *m = GetCatalogChanges{} }
func (m *GetCatalogChanges) String() string { return proto.CompactTextString(m) }
func (*GetCatalogChanges) ProtoMessage() {}
func (*GetCatalogChanges) Descriptor() ([]byte, []int) {
return fileDescriptor_0abbfcf058acdf89, []int{9}
}
func (m *GetCatalogChangesRet) XXX_Unmarshal(b []byte) error {
func (m *GetCatalogChanges) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GetCatalogChangesRet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
func (m *GetCatalogChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GetCatalogChangesRet.Marshal(b, m, deterministic)
return xxx_messageInfo_GetCatalogChanges.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@ -613,32 +613,142 @@ func (m *GetCatalogChangesRet) XXX_Marshal(b []byte, deterministic bool) ([]byte
return b[:n], nil
}
}
func (m *GetCatalogChangesRet) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCatalogChangesRet.Merge(m, src)
func (m *GetCatalogChanges) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetCatalogChanges.Merge(m, src)
}
func (m *GetCatalogChangesRet) XXX_Size() int {
func (m *GetCatalogChanges) XXX_Size() int {
return m.Size()
}
func (m *GetCatalogChangesRet) XXX_DiscardUnknown() {
xxx_messageInfo_GetCatalogChangesRet.DiscardUnknown(m)
func (m *GetCatalogChanges) XXX_DiscardUnknown() {
xxx_messageInfo_GetCatalogChanges.DiscardUnknown(m)
}
var xxx_messageInfo_GetCatalogChangesRet proto.InternalMessageInfo
var xxx_messageInfo_GetCatalogChanges proto.InternalMessageInfo
func (m *GetCatalogChangesRet) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
func (m *GetCatalogChanges) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.RouteVersion
}
return 0
}
func (m *GetCatalogChangesRet) GetItems() []CatalogChangeItem {
func (m *GetCatalogChanges) GetItems() []CatalogChangeItem {
if m != nil {
return m.Items
}
return nil
}
type ListSpaceArgs struct {
Marker github_com_cubefs_cubefs_blobstore_common_proto.SpaceID `protobuf:"varint,1,opt,name=marker,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.SpaceID" json:"marker,omitempty"`
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListSpaceArgs) Reset() { *m = ListSpaceArgs{} }
func (m *ListSpaceArgs) String() string { return proto.CompactTextString(m) }
func (*ListSpaceArgs) ProtoMessage() {}
func (*ListSpaceArgs) Descriptor() ([]byte, []int) {
return fileDescriptor_0abbfcf058acdf89, []int{10}
}
func (m *ListSpaceArgs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ListSpaceArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ListSpaceArgs.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 *ListSpaceArgs) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListSpaceArgs.Merge(m, src)
}
func (m *ListSpaceArgs) XXX_Size() int {
return m.Size()
}
func (m *ListSpaceArgs) XXX_DiscardUnknown() {
xxx_messageInfo_ListSpaceArgs.DiscardUnknown(m)
}
var xxx_messageInfo_ListSpaceArgs proto.InternalMessageInfo
func (m *ListSpaceArgs) GetMarker() github_com_cubefs_cubefs_blobstore_common_proto.SpaceID {
if m != nil {
return m.Marker
}
return 0
}
func (m *ListSpaceArgs) GetCount() uint32 {
if m != nil {
return m.Count
}
return 0
}
type ListSpaceRet struct {
Spaces []*Space `protobuf:"bytes,1,rep,name=spaces,proto3" json:"spaces,omitempty"`
Marker github_com_cubefs_cubefs_blobstore_common_proto.SpaceID `protobuf:"varint,2,opt,name=marker,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.SpaceID" json:"marker,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListSpaceRet) Reset() { *m = ListSpaceRet{} }
func (m *ListSpaceRet) String() string { return proto.CompactTextString(m) }
func (*ListSpaceRet) ProtoMessage() {}
func (*ListSpaceRet) Descriptor() ([]byte, []int) {
return fileDescriptor_0abbfcf058acdf89, []int{11}
}
func (m *ListSpaceRet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ListSpaceRet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ListSpaceRet.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 *ListSpaceRet) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListSpaceRet.Merge(m, src)
}
func (m *ListSpaceRet) XXX_Size() int {
return m.Size()
}
func (m *ListSpaceRet) XXX_DiscardUnknown() {
xxx_messageInfo_ListSpaceRet.DiscardUnknown(m)
}
var xxx_messageInfo_ListSpaceRet proto.InternalMessageInfo
func (m *ListSpaceRet) GetSpaces() []*Space {
if m != nil {
return m.Spaces
}
return nil
}
func (m *ListSpaceRet) GetMarker() github_com_cubefs_cubefs_blobstore_common_proto.SpaceID {
if m != nil {
return m.Marker
}
return 0
}
func init() {
proto.RegisterType((*Space)(nil), "cubefs.blobstore.api.clustermgr.Space")
proto.RegisterType((*FieldMeta)(nil), "cubefs.blobstore.api.clustermgr.FieldMeta")
@ -649,60 +759,66 @@ func init() {
proto.RegisterType((*CatalogChangeShardUpdate)(nil), "cubefs.blobstore.api.clustermgr.CatalogChangeShardUpdate")
proto.RegisterType((*CatalogChangeItem)(nil), "cubefs.blobstore.api.clustermgr.CatalogChangeItem")
proto.RegisterType((*GetCatalogChangesArgs)(nil), "cubefs.blobstore.api.clustermgr.GetCatalogChangesArgs")
proto.RegisterType((*GetCatalogChangesRet)(nil), "cubefs.blobstore.api.clustermgr.GetCatalogChangesRet")
proto.RegisterType((*GetCatalogChanges)(nil), "cubefs.blobstore.api.clustermgr.GetCatalogChanges")
proto.RegisterType((*ListSpaceArgs)(nil), "cubefs.blobstore.api.clustermgr.ListSpaceArgs")
proto.RegisterType((*ListSpaceRet)(nil), "cubefs.blobstore.api.clustermgr.ListSpaceRet")
}
func init() { proto.RegisterFile("catalog.proto", fileDescriptor_0abbfcf058acdf89) }
var fileDescriptor_0abbfcf058acdf89 = []byte{
// 743 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xdd, 0x6a, 0xdb, 0x48,
0x14, 0x5e, 0x29, 0xb2, 0xbd, 0x9e, 0xc4, 0x2c, 0x2b, 0x1c, 0xf0, 0x66, 0xd9, 0x28, 0xe8, 0xca,
0x6c, 0x41, 0x82, 0x14, 0x5a, 0x42, 0x5a, 0x5a, 0x3b, 0x69, 0x52, 0x35, 0x34, 0x25, 0x4a, 0xd3,
0x42, 0x69, 0x31, 0x63, 0xe9, 0x58, 0x16, 0xb1, 0x34, 0x42, 0x33, 0x2a, 0xf1, 0x75, 0x5f, 0xa9,
0x0f, 0x91, 0x9b, 0x42, 0x1f, 0xa0, 0x15, 0xc5, 0x57, 0x7d, 0x06, 0x5f, 0x95, 0x99, 0x91, 0x9d,
0x1f, 0x97, 0x84, 0xb8, 0x90, 0xde, 0xcd, 0xcc, 0x99, 0xf3, 0x9d, 0xf3, 0x7d, 0x47, 0x9f, 0x06,
0xd5, 0x3c, 0xcc, 0xf0, 0x80, 0x04, 0x56, 0x92, 0x12, 0x46, 0x74, 0xc3, 0xcb,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xe5, 0xa3, 0x75, 0xef, 0xa6, 0xa5, 0x64, 0xa6,
0x5b, 0xe6, 0xa0, 0x8e, 0x6f, 0x7e, 0x52, 0x50, 0x7d, 0x86, 0x9f, 0x0b, 0xec, 0xb6, 0xe8, 0xed,
0xa3, 0x12, 0xd7, 0x79, 0xf2, 0x43, 0x5b, 0xbf, 0xf6, 0x83, 0x9d, 0x19, 0xeb, 0xc4, 0x95, 0x02,
0xa6, 0xfd, 0xef, 0xe9, 0x68, 0x55, 0xf9, 0x3c, 0x5a, 0x55, 0xbe, 0x8d, 0x56, 0x95, 0x37, 0x35,
0xcb, 0xde, 0x3c, 0xcb, 0xed, 0x96, 0x45, 0x3b, 0x77, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe6,
0x15, 0xe0, 0x1e, 0xa3, 0x08, 0x00, 0x00,
// 811 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x8f, 0xdb, 0x44,
0x14, 0xc7, 0xae, 0x93, 0x90, 0xb7, 0x89, 0x50, 0xad, 0xad, 0x64, 0x8a, 0x58, 0xaf, 0x7c, 0x40,
0x11, 0x48, 0xb6, 0x54, 0x24, 0x50, 0xb5, 0xfc, 0x4b, 0x76, 0x69, 0x31, 0x85, 0xa2, 0x3a, 0x14,
0x24, 0x04, 0x8a, 0x26, 0xf6, 0x8b, 0x63, 0x6d, 0xec, 0xb1, 0x3c, 0x63, 0xd4, 0x70, 0xe5, 0xa3,
0x70, 0x86, 0x13, 0x1f, 0xa2, 0xe2, 0xc4, 0x17, 0xc0, 0x42, 0x39, 0xf1, 0x19, 0x72, 0x42, 0x33,
0xe3, 0x64, 0xd3, 0x06, 0x35, 0xda, 0x2c, 0xec, 0x81, 0xdb, 0xcc, 0xbc, 0x79, 0xbf, 0xf7, 0xde,
0xef, 0xe7, 0xf7, 0xc6, 0xd0, 0x0d, 0x09, 0x27, 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0x5d, 0x55, 0x64, 0x9c, 0x2d, 0x2a, 0xbb, 0xf9, 0x90, 0x46, 0xea, 0x59, 0x7d, 0xe7,
0xb2, 0xa1, 0x94, 0x67, 0xd0, 0x14, 0xa0, 0x7e, 0xe4, 0xfc, 0xa6, 0xc1, 0xcd, 0xad, 0xfa, 0xae,
0xab, 0xb6, 0x87, 0xd0, 0x10, 0x24, 0xaf, 0xe6, 0xed, 0x9d, 0x9d, 0x5f, 0xeb, 0x96, 0xa6, 0xab,
0x1e, 0x97, 0x30, 0xce, 0x0f, 0xd0, 0xfd, 0x2c, 0x61, 0x1b, 0x33, 0x77, 0x08, 0xcd, 0x94, 0x14,
0xe7, 0x58, 0xd4, 0x5d, 0x7d, 0x72, 0x95, 0x1f, 0x91, 0x1a, 0x4a, 0xcc, 0xe3, 0x90, 0x96, 0x19,
0x57, 0x7a, 0x04, 0x6a, 0xe3, 0xfc, 0xa4, 0x41, 0x67, 0x1d, 0x3c, 0x40, 0x6e, 0x7e, 0x00, 0x4d,
0xf9, 0xe7, 0xc2, 0x2c, 0x4d, 0x56, 0xf7, 0xc6, 0xee, 0x5e, 0x94, 0xae, 0xb5, 0xd7, 0x46, 0xee,
0xfa, 0xbf, 0x96, 0xfb, 0xe0, 0xb5, 0xa7, 0x8b, 0x23, 0xed, 0xf7, 0xc5, 0x91, 0xf6, 0xe7, 0xe2,
0x48, 0xfb, 0xa6, 0xeb, 0x7a, 0x27, 0x17, 0xf1, 0xc7, 0x4d, 0xe9, 0xf3, 0xf6, 0xdf, 0x01, 0x00,
0x00, 0xff, 0xff, 0x16, 0xb2, 0x08, 0x30, 0x64, 0x0a, 0x00, 0x00,
}
func (m *Space) Marshal() (dAtA []byte, err error) {
@ -987,8 +1103,8 @@ func (m *CatalogChangeShardAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) {
dAtA[i] = 0x1a
}
}
if m.Epoch != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.Epoch))
if m.RouteVersion != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x10
}
@ -1034,8 +1150,8 @@ func (m *CatalogChangeShardUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error
}
i--
dAtA[i] = 0x1a
if m.Epoch != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.Epoch))
if m.RouteVersion != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x10
}
@ -1133,7 +1249,7 @@ func (m *GetCatalogChangesArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *GetCatalogChangesRet) Marshal() (dAtA []byte, err error) {
func (m *GetCatalogChanges) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -1143,12 +1259,12 @@ func (m *GetCatalogChangesRet) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *GetCatalogChangesRet) MarshalTo(dAtA []byte) (int, error) {
func (m *GetCatalogChanges) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GetCatalogChangesRet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
func (m *GetCatalogChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@ -1179,6 +1295,89 @@ func (m *GetCatalogChangesRet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *ListSpaceArgs) 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 *ListSpaceArgs) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ListSpaceArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Count != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.Count))
i--
dAtA[i] = 0x10
}
if m.Marker != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.Marker))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *ListSpaceRet) 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 *ListSpaceRet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ListSpaceRet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Marker != 0 {
i = encodeVarintCatalog(dAtA, i, uint64(m.Marker))
i--
dAtA[i] = 0x10
}
if len(m.Spaces) > 0 {
for iNdEx := len(m.Spaces) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Spaces[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintCatalog(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintCatalog(dAtA []byte, offset int, v uint64) int {
offset -= sovCatalog(v)
base := offset
@ -1318,8 +1517,8 @@ func (m *CatalogChangeShardAdd) Size() (n int) {
if m.ShardID != 0 {
n += 1 + sovCatalog(uint64(m.ShardID))
}
if m.Epoch != 0 {
n += 1 + sovCatalog(uint64(m.Epoch))
if m.RouteVersion != 0 {
n += 1 + sovCatalog(uint64(m.RouteVersion))
}
if len(m.Units) > 0 {
for _, e := range m.Units {
@ -1342,8 +1541,8 @@ func (m *CatalogChangeShardUpdate) Size() (n int) {
if m.ShardID != 0 {
n += 1 + sovCatalog(uint64(m.ShardID))
}
if m.Epoch != 0 {
n += 1 + sovCatalog(uint64(m.Epoch))
if m.RouteVersion != 0 {
n += 1 + sovCatalog(uint64(m.RouteVersion))
}
l = m.Unit.Size()
n += 1 + l + sovCatalog(uint64(l))
@ -1393,7 +1592,7 @@ func (m *GetCatalogChangesArgs) Size() (n int) {
return n
}
func (m *GetCatalogChangesRet) Size() (n int) {
func (m *GetCatalogChanges) Size() (n int) {
if m == nil {
return 0
}
@ -1414,6 +1613,45 @@ func (m *GetCatalogChangesRet) Size() (n int) {
return n
}
func (m *ListSpaceArgs) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Marker != 0 {
n += 1 + sovCatalog(uint64(m.Marker))
}
if m.Count != 0 {
n += 1 + sovCatalog(uint64(m.Count))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ListSpaceRet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Spaces) > 0 {
for _, e := range m.Spaces {
l = e.Size()
n += 1 + l + sovCatalog(uint64(l))
}
}
if m.Marker != 0 {
n += 1 + sovCatalog(uint64(m.Marker))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovCatalog(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -2144,9 +2382,9 @@ func (m *CatalogChangeShardAdd) Unmarshal(dAtA []byte) error {
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.Epoch = 0
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCatalog
@ -2156,7 +2394,7 @@ func (m *CatalogChangeShardAdd) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
@ -2267,9 +2505,9 @@ func (m *CatalogChangeShardUpdate) Unmarshal(dAtA []byte) error {
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.Epoch = 0
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCatalog
@ -2279,7 +2517,7 @@ func (m *CatalogChangeShardUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
@ -2553,7 +2791,7 @@ func (m *GetCatalogChangesArgs) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *GetCatalogChangesRet) Unmarshal(dAtA []byte) error {
func (m *GetCatalogChanges) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -2576,10 +2814,10 @@ func (m *GetCatalogChangesRet) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: GetCatalogChangesRet: wiretype end group for non-group")
return fmt.Errorf("proto: GetCatalogChanges: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GetCatalogChangesRet: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: GetCatalogChanges: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -2657,6 +2895,199 @@ func (m *GetCatalogChangesRet) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *ListSpaceArgs) 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 ErrIntOverflowCatalog
}
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: ListSpaceArgs: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ListSpaceArgs: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Marker", wireType)
}
m.Marker = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCatalog
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Marker |= github_com_cubefs_cubefs_blobstore_common_proto.SpaceID(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
}
m.Count = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCatalog
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Count |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCatalog(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCatalog
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ListSpaceRet) 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 ErrIntOverflowCatalog
}
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: ListSpaceRet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ListSpaceRet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Spaces", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCatalog
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthCatalog
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthCatalog
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Spaces = append(m.Spaces, &Space{})
if err := m.Spaces[len(m.Spaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Marker", wireType)
}
m.Marker = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCatalog
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Marker |= github_com_cubefs_cubefs_blobstore_common_proto.SpaceID(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipCatalog(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCatalog
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipCatalog(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -44,13 +44,13 @@ message AuthSpaceArgs {
message CatalogChangeShardAdd {
uint32 shard_id = 1 [(gogoproto.customname) = "ShardID", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardID"];
uint64 epoch = 2;
uint64 route_version = 2 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
repeated ShardUnitInfo units = 3 [(gogoproto.nullable) = false];
}
message CatalogChangeShardUpdate {
uint32 shard_id = 1 [(gogoproto.customname) = "ShardID", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardID"];
uint64 epoch = 2;
uint64 route_version = 2 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
ShardUnitInfo unit = 3 [(gogoproto.nullable) = false];
}
@ -65,7 +65,17 @@ message GetCatalogChangesArgs {
uint32 node_id = 2 [(gogoproto.customname) = "NodeID", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.NodeID"];
}
message GetCatalogChangesRet {
message GetCatalogChanges {
uint64 route_version = 1 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
repeated CatalogChangeItem items = 2 [(gogoproto.nullable) = false];
}
message ListSpaceArgs {
uint32 marker = 1 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.SpaceID"];
uint32 count = 2;
}
message ListSpaceRet {
repeated Space spaces = 1;
uint32 marker = 2 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.SpaceID"];
}

View File

@ -26,15 +26,15 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Shard struct {
ShardID github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"shard_id,omitempty"`
AppliedIndex uint64 `protobuf:"varint,2,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
LeaderIdx uint32 `protobuf:"varint,3,opt,name=leader_idx,json=leaderIdx,proto3" json:"leader_idx,omitempty"`
Range sharding.Range `protobuf:"bytes,4,opt,name=range,proto3" json:"range"`
Units []ShardUnit `protobuf:"bytes,5,rep,name=units,proto3" json:"units"`
Epoch uint64 `protobuf:"varint,6,opt,name=epoch,proto3" json:"epoch,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
ShardID github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"shard_id,omitempty"`
AppliedIndex uint64 `protobuf:"varint,2,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
LeaderIdx uint32 `protobuf:"varint,3,opt,name=leader_idx,json=leaderIdx,proto3" json:"leader_idx,omitempty"`
Range sharding.Range `protobuf:"bytes,4,opt,name=range,proto3" json:"range"`
Units []ShardUnit `protobuf:"bytes,5,rep,name=units,proto3" json:"units"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,6,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Shard) Reset() { *m = Shard{} }
@ -105,9 +105,9 @@ func (m *Shard) GetUnits() []ShardUnit {
return nil
}
func (m *Shard) GetEpoch() uint64 {
func (m *Shard) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.Epoch
return m.RouteVersion
}
return 0
}
@ -176,17 +176,18 @@ func (m *ShardUnit) GetLearner() bool {
}
type ShardUnitInfo struct {
Suid github_com_cubefs_cubefs_blobstore_common_proto.Suid `protobuf:"varint,1,opt,name=suid,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.Suid" json:"suid,omitempty"`
DiskID github_com_cubefs_cubefs_blobstore_common_proto.DiskID `protobuf:"varint,2,opt,name=disk_id,json=diskId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.DiskID" json:"disk_id,omitempty"`
AppliedIndex uint64 `protobuf:"varint,3,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
LeaderIdx uint32 `protobuf:"varint,4,opt,name=leader_idx,json=leaderIdx,proto3" json:"leader_idx,omitempty"`
Range sharding.Range `protobuf:"bytes,5,opt,name=range,proto3" json:"range"`
Epoch uint64 `protobuf:"varint,6,opt,name=epoch,proto3" json:"epoch,omitempty"`
Host string `protobuf:"bytes,7,opt,name=host,proto3" json:"host,omitempty"`
Learner bool `protobuf:"varint,8,opt,name=learner,proto3" json:"learner,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Suid github_com_cubefs_cubefs_blobstore_common_proto.Suid `protobuf:"varint,1,opt,name=suid,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.Suid" json:"suid,omitempty"`
DiskID github_com_cubefs_cubefs_blobstore_common_proto.DiskID `protobuf:"varint,2,opt,name=disk_id,json=diskId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.DiskID" json:"disk_id,omitempty"`
AppliedIndex uint64 `protobuf:"varint,3,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
LeaderIdx uint32 `protobuf:"varint,4,opt,name=leader_idx,json=leaderIdx,proto3" json:"leader_idx,omitempty"`
Range sharding.Range `protobuf:"bytes,5,opt,name=range,proto3" json:"range"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,6,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
Host string `protobuf:"bytes,7,opt,name=host,proto3" json:"host,omitempty"`
Learner bool `protobuf:"varint,8,opt,name=learner,proto3" json:"learner,omitempty"`
Status github_com_cubefs_cubefs_blobstore_common_proto.ShardUnitStatus `protobuf:"varint,9,opt,name=status,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardUnitStatus" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShardUnitInfo) Reset() { *m = ShardUnitInfo{} }
@ -257,9 +258,9 @@ func (m *ShardUnitInfo) GetRange() sharding.Range {
return sharding.Range{}
}
func (m *ShardUnitInfo) GetEpoch() uint64 {
func (m *ShardUnitInfo) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.Epoch
return m.RouteVersion
}
return 0
}
@ -278,11 +279,19 @@ func (m *ShardUnitInfo) GetLearner() bool {
return false
}
func (m *ShardUnitInfo) GetStatus() github_com_cubefs_cubefs_blobstore_common_proto.ShardUnitStatus {
if m != nil {
return m.Status
}
return 0
}
type ShardTask struct {
TaskType github_com_cubefs_cubefs_blobstore_common_proto.ShardTaskType `protobuf:"varint,1,opt,name=task_type,json=taskType,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardTaskType" json:"task_type,omitempty"`
DiskID github_com_cubefs_cubefs_blobstore_common_proto.DiskID `protobuf:"varint,2,opt,name=disk_id,json=diskId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.DiskID" json:"disk_id,omitempty"`
Suid github_com_cubefs_cubefs_blobstore_common_proto.Suid `protobuf:"varint,3,opt,name=suid,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.Suid" json:"suid,omitempty"`
Epoch uint64 `protobuf:"varint,4,opt,name=epoch,proto3" json:"epoch,omitempty"`
OldRouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,4,opt,name=old_route_version,json=oldRouteVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"old_route_version,omitempty"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,5,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -342,9 +351,16 @@ func (m *ShardTask) GetSuid() github_com_cubefs_cubefs_blobstore_common_proto.Su
return 0
}
func (m *ShardTask) GetEpoch() uint64 {
func (m *ShardTask) GetOldRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.Epoch
return m.OldRouteVersion
}
return 0
}
func (m *ShardTask) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.RouteVersion
}
return 0
}
@ -830,7 +846,7 @@ func (m *ListShardArgs) GetCount() uint32 {
type ListShardRet struct {
Shards []*Shard `protobuf:"bytes,1,rep,name=shards,proto3" json:"shards,omitempty"`
Marker github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,2,opt,name=Marker,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"Marker,omitempty"`
Marker github_com_cubefs_cubefs_blobstore_common_proto.ShardID `protobuf:"varint,2,opt,name=marker,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.ShardID" json:"marker,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -883,6 +899,62 @@ func (m *ListShardRet) GetMarker() github_com_cubefs_cubefs_blobstore_common_pro
return 0
}
type AdminUpdateShardUnitArgs struct {
Epoch uint32 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
NextEpoch uint32 `protobuf:"varint,2,opt,name=next_epoch,json=nextEpoch,proto3" json:"next_epoch,omitempty"`
ShardUnitInfo `protobuf:"bytes,3,opt,name=unit_info,json=unitInfo,proto3,embedded=unit_info" json:"unit_info"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AdminUpdateShardUnitArgs) Reset() { *m = AdminUpdateShardUnitArgs{} }
func (m *AdminUpdateShardUnitArgs) String() string { return proto.CompactTextString(m) }
func (*AdminUpdateShardUnitArgs) ProtoMessage() {}
func (*AdminUpdateShardUnitArgs) Descriptor() ([]byte, []int) {
return fileDescriptor_319ea41e44cdc364, []int{14}
}
func (m *AdminUpdateShardUnitArgs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AdminUpdateShardUnitArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AdminUpdateShardUnitArgs.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 *AdminUpdateShardUnitArgs) XXX_Merge(src proto.Message) {
xxx_messageInfo_AdminUpdateShardUnitArgs.Merge(m, src)
}
func (m *AdminUpdateShardUnitArgs) XXX_Size() int {
return m.Size()
}
func (m *AdminUpdateShardUnitArgs) XXX_DiscardUnknown() {
xxx_messageInfo_AdminUpdateShardUnitArgs.DiscardUnknown(m)
}
var xxx_messageInfo_AdminUpdateShardUnitArgs proto.InternalMessageInfo
func (m *AdminUpdateShardUnitArgs) GetEpoch() uint32 {
if m != nil {
return m.Epoch
}
return 0
}
func (m *AdminUpdateShardUnitArgs) GetNextEpoch() uint32 {
if m != nil {
return m.NextEpoch
}
return 0
}
func init() {
proto.RegisterType((*Shard)(nil), "cubefs.blobstore.api.clustermgr.Shard")
proto.RegisterType((*ShardUnit)(nil), "cubefs.blobstore.api.clustermgr.ShardUnit")
@ -898,65 +970,73 @@ func init() {
proto.RegisterType((*ListShardUnitRet)(nil), "cubefs.blobstore.api.clustermgr.ListShardUnitRet")
proto.RegisterType((*ListShardArgs)(nil), "cubefs.blobstore.api.clustermgr.ListShardArgs")
proto.RegisterType((*ListShardRet)(nil), "cubefs.blobstore.api.clustermgr.ListShardRet")
proto.RegisterType((*AdminUpdateShardUnitArgs)(nil), "cubefs.blobstore.api.clustermgr.AdminUpdateShardUnitArgs")
}
func init() { proto.RegisterFile("shard.proto", fileDescriptor_319ea41e44cdc364) }
var fileDescriptor_319ea41e44cdc364 = []byte{
// 834 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xdd, 0x8a, 0xe4, 0x44,
0x14, 0x36, 0xdd, 0xe9, 0xbf, 0xd3, 0xd3, 0xeb, 0x6e, 0xb1, 0x17, 0x61, 0xc5, 0x49, 0x13, 0x41,
0x1b, 0x91, 0x34, 0xac, 0xa2, 0xc2, 0xa2, 0xb8, 0xed, 0x30, 0x4b, 0xc3, 0xae, 0x60, 0x66, 0x06,
0x44, 0x90, 0x90, 0x4e, 0xd5, 0xa4, 0x6b, 0x3b, 0x9d, 0x8a, 0xa9, 0x0a, 0x33, 0xeb, 0x5b, 0xf8,
0x0c, 0xbe, 0x89, 0x57, 0x7b, 0xa9, 0xb7, 0x22, 0x41, 0x72, 0xed, 0x13, 0xcc, 0x95, 0x54, 0x55,
0xd2, 0x3f, 0xee, 0x2e, 0x3b, 0x3b, 0x3d, 0x73, 0xb1, 0x77, 0x55, 0x95, 0x3a, 0xdf, 0x57, 0xdf,
0x39, 0xdf, 0x39, 0x04, 0xfa, 0x7c, 0x1e, 0x64, 0xd8, 0x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23, 0xa9, 0x90, 0xc5, 0x58, 0x2b, 0x34, 0x77, 0x55, 0xc8, 0x62, 0xac, 0x14,
0x3a, 0x30, 0x90, 0xa0, 0x6b, 0xe2, 0x96, 0x26, 0x66, 0x31, 0xae, 0x89, 0x9d, 0x9f, 0x61, 0xef,
0x11, 0x11, 0xeb, 0x54, 0xdf, 0xfc, 0x5f, 0x88, 0x93, 0xc1, 0x9d, 0xc7, 0x94, 0x8b, 0xed, 0x5e,
0xd9, 0x70, 0x9a, 0x71, 0xfd, 0x4e, 0x73, 0x62, 0xb8, 0xbd, 0xc5, 0x29, 0x5b, 0xe6, 0x07, 0xb8,
0xad, 0xa5, 0xca, 0x7f, 0x09, 0x9f, 0x26, 0xa7, 0xec, 0xaa, 0xb3, 0xe6, 0x16, 0xdf, 0xdc, 0x72,
0xe7, 0x17, 0x18, 0xac, 0xd8, 0x2a, 0x03, 0xb7, 0x97, 0x41, 0xb6, 0x20, 0x59, 0x25, 0xee, 0xc1,
0x2e, 0x89, 0xac, 0xa0, 0xe4, 0x18, 0x0d, 0x59, 0x9e, 0x08, 0x6d, 0x5d, 0x4f, 0x6f, 0x9c, 0xdf,
0x0c, 0xd8, 0x5b, 0x91, 0x4b, 0x99, 0x5f, 0xff, 0x6f, 0x90, 0x7e, 0x78, 0x39, 0x71, 0xf5, 0x00,
0x95, 0x6f, 0x7f, 0xa2, 0xdf, 0xde, 0xb8, 0x86, 0xb7, 0x6b, 0xa8, 0xc9, 0x7b, 0xcf, 0xcb, 0x7d,
0xe3, 0x8f, 0x72, 0xdf, 0xf8, 0xa7, 0xdc, 0x37, 0x7e, 0x1c, 0xb8, 0xe3, 0x07, 0x6b, 0xfe, 0x59,
0x5b, 0xc5, 0x7c, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xf6, 0x2d, 0xd3, 0x8e, 0x0b,
0x00, 0x00,
// 957 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00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b6, 0x8d, 0xef, 0xdb, 0x5e, 0xef, 0xfe, 0xd2, 0x7d, 0x58, 0xd7, 0xe4, 0x3e, 0xf8,
0x2f, 0x00, 0x00, 0xff, 0xff, 0x59, 0x2f, 0xa0, 0x96, 0xf5, 0x0d, 0x00, 0x00,
}
func (m *Shard) Marshal() (dAtA []byte, err error) {
@ -983,8 +1063,8 @@ func (m *Shard) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Epoch != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.Epoch))
if m.RouteVersion != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x30
}
@ -1101,6 +1181,11 @@ func (m *ShardUnitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Status != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.Status))
i--
dAtA[i] = 0x48
}
if m.Learner {
i--
if m.Learner {
@ -1118,8 +1203,8 @@ func (m *ShardUnitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x3a
}
if m.Epoch != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.Epoch))
if m.RouteVersion != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x30
}
@ -1180,8 +1265,13 @@ func (m *ShardTask) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Epoch != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.Epoch))
if m.RouteVersion != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x28
}
if m.OldRouteVersion != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.OldRouteVersion))
i--
dAtA[i] = 0x20
}
@ -1611,6 +1701,53 @@ func (m *ListShardRet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *AdminUpdateShardUnitArgs) 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 *AdminUpdateShardUnitArgs) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AdminUpdateShardUnitArgs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
{
size, err := m.ShardUnitInfo.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintShard(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
if m.NextEpoch != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.NextEpoch))
i--
dAtA[i] = 0x10
}
if m.Epoch != 0 {
i = encodeVarintShard(dAtA, i, uint64(m.Epoch))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintShard(dAtA []byte, offset int, v uint64) int {
offset -= sovShard(v)
base := offset
@ -1645,8 +1782,8 @@ func (m *Shard) Size() (n int) {
n += 1 + l + sovShard(uint64(l))
}
}
if m.Epoch != 0 {
n += 1 + sovShard(uint64(m.Epoch))
if m.RouteVersion != 0 {
n += 1 + sovShard(uint64(m.RouteVersion))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
@ -1695,8 +1832,8 @@ func (m *ShardUnitInfo) Size() (n int) {
}
l = m.Range.Size()
n += 1 + l + sovShard(uint64(l))
if m.Epoch != 0 {
n += 1 + sovShard(uint64(m.Epoch))
if m.RouteVersion != 0 {
n += 1 + sovShard(uint64(m.RouteVersion))
}
l = len(m.Host)
if l > 0 {
@ -1705,6 +1842,9 @@ func (m *ShardUnitInfo) Size() (n int) {
if m.Learner {
n += 2
}
if m.Status != 0 {
n += 1 + sovShard(uint64(m.Status))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@ -1726,8 +1866,11 @@ func (m *ShardTask) Size() (n int) {
if m.Suid != 0 {
n += 1 + sovShard(uint64(m.Suid))
}
if m.Epoch != 0 {
n += 1 + sovShard(uint64(m.Epoch))
if m.OldRouteVersion != 0 {
n += 1 + sovShard(uint64(m.OldRouteVersion))
}
if m.RouteVersion != 0 {
n += 1 + sovShard(uint64(m.RouteVersion))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
@ -1922,6 +2065,26 @@ func (m *ListShardRet) Size() (n int) {
return n
}
func (m *AdminUpdateShardUnitArgs) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Epoch != 0 {
n += 1 + sovShard(uint64(m.Epoch))
}
if m.NextEpoch != 0 {
n += 1 + sovShard(uint64(m.NextEpoch))
}
l = m.ShardUnitInfo.Size()
n += 1 + l + sovShard(uint64(l))
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovShard(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -2083,9 +2246,9 @@ func (m *Shard) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.Epoch = 0
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
@ -2095,7 +2258,7 @@ func (m *Shard) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
@ -2371,9 +2534,9 @@ func (m *ShardUnitInfo) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.Epoch = 0
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
@ -2383,7 +2546,7 @@ func (m *ShardUnitInfo) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
@ -2440,6 +2603,25 @@ func (m *ShardUnitInfo) Unmarshal(dAtA []byte) error {
}
}
m.Learner = bool(v != 0)
case 9:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
m.Status = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Status |= github_com_cubefs_cubefs_blobstore_common_proto.ShardUnitStatus(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipShard(dAtA[iNdEx:])
@ -2550,9 +2732,9 @@ func (m *ShardTask) Unmarshal(dAtA []byte) error {
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field OldRouteVersion", wireType)
}
m.Epoch = 0
m.OldRouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
@ -2562,7 +2744,26 @@ func (m *ShardTask) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
m.OldRouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
@ -3516,6 +3717,128 @@ func (m *ListShardRet) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *AdminUpdateShardUnitArgs) 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 ErrIntOverflowShard
}
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: AdminUpdateShardUnitArgs: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AdminUpdateShardUnitArgs: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
}
m.Epoch = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NextEpoch", wireType)
}
m.NextEpoch = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.NextEpoch |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ShardUnitInfo", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShard
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthShard
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthShard
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ShardUnitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipShard(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthShard
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipShard(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -16,7 +16,7 @@ message Shard {
uint32 leader_idx = 3;
cubefs.blobstore.common.sharding.Range range = 4 [(gogoproto.nullable) = false];
repeated ShardUnit units = 5 [(gogoproto.nullable) = false];
uint64 epoch = 6;
uint64 route_version = 6 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
}
message ShardUnit {
@ -31,16 +31,18 @@ message ShardUnitInfo {
uint64 applied_index = 3;
uint32 leader_idx = 4;
cubefs.blobstore.common.sharding.Range range = 5 [(gogoproto.nullable) = false];
uint64 epoch = 6;
uint64 route_version = 6 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
string host = 7;
bool learner = 8;
uint32 status = 9 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardUnitStatus"];
}
message ShardTask {
uint32 task_type = 1 [(gogoproto.customname) = "TaskType", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardTaskType"];;
uint32 task_type = 1 [(gogoproto.customname) = "TaskType", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardTaskType"];
uint32 disk_id = 2 [(gogoproto.customname) = "DiskID", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.DiskID"];
uint32 suid = 3 [(gogoproto.customname) = "Suid", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.Suid"];
uint64 epoch = 4;
uint64 old_route_version = 4 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
uint64 route_version = 5 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
}
message ShardReport {
@ -81,12 +83,18 @@ message ListShardUnitRet {
repeated ShardUnitInfo shard_unit_infos = 1;
}
message ListShardArgs {
message ListShardArgs {
uint32 marker = 1 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardID"];
uint32 count = 2;
}
message ListShardRet {
repeated Shard shards = 1;
uint32 Marker = 2 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardID"];
uint32 marker = 2 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.ShardID"];
}
message AdminUpdateShardUnitArgs {
uint32 epoch = 1;
uint32 next_epoch = 2;
ShardUnitInfo unit_info = 3 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
}

View File

@ -736,14 +736,14 @@ func (m *ListItemResponse) GetNextMarker() []byte {
}
type AddShardRequest struct {
DiskID github_com_cubefs_cubefs_blobstore_common_proto.DiskID `protobuf:"varint,1,opt,name=disk_id,json=diskId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.DiskID" json:"disk_id,omitempty"`
Suid github_com_cubefs_cubefs_blobstore_common_proto.Suid `protobuf:"varint,2,opt,name=suid,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.Suid" json:"suid,omitempty"`
Range sharding.Range `protobuf:"bytes,3,opt,name=range,proto3" json:"range"`
Units []clustermgr.ShardUnit `protobuf:"bytes,4,rep,name=units,proto3" json:"units"`
Epoch uint64 `protobuf:"varint,5,opt,name=epoch,proto3" json:"epoch,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
DiskID github_com_cubefs_cubefs_blobstore_common_proto.DiskID `protobuf:"varint,1,opt,name=disk_id,json=diskId,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.DiskID" json:"disk_id,omitempty"`
Suid github_com_cubefs_cubefs_blobstore_common_proto.Suid `protobuf:"varint,2,opt,name=suid,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.Suid" json:"suid,omitempty"`
Range sharding.Range `protobuf:"bytes,3,opt,name=range,proto3" json:"range"`
Units []clustermgr.ShardUnit `protobuf:"bytes,4,rep,name=units,proto3" json:"units"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,5,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddShardRequest) Reset() { *m = AddShardRequest{} }
@ -807,9 +807,9 @@ func (m *AddShardRequest) GetUnits() []clustermgr.ShardUnit {
return nil
}
func (m *AddShardRequest) GetEpoch() uint64 {
func (m *AddShardRequest) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.Epoch
return m.RouteVersion
}
return 0
}
@ -1626,72 +1626,72 @@ func init() {
func init() { proto.RegisterFile("shardnode.proto", fileDescriptor_9d3815ca0e5f30f0) }
var fileDescriptor_9d3815ca0e5f30f0 = []byte{
// 1025 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5,
0x17, 0xff, 0xee, 0x7a, 0xed, 0xe4, 0xfb, 0x92, 0xe0, 0x64, 0x09, 0xc8, 0x8a, 0x84, 0x37, 0xda,
0x82, 0x88, 0xf8, 0xb1, 0x96, 0x02, 0x82, 0x43, 0x05, 0x6d, 0x1d, 0x2b, 0x60, 0x42, 0x05, 0xdd,
0xb4, 0x3d, 0x20, 0x41, 0xb4, 0xf6, 0x4c, 0x9c, 0x51, 0xec, 0x9d, 0xed, 0xce, 0x6c, 0x95, 0x70,
0xe2, 0xc4, 0x81, 0x0b, 0x12, 0x7f, 0x01, 0x07, 0xfe, 0x16, 0xd4, 0x23, 0x7f, 0xc1, 0x0a, 0xf9,
0xc6, 0x91, 0x6b, 0x4e, 0x68, 0xde, 0xcc, 0xfa, 0x47, 0x4a, 0x9b, 0x3a, 0x8a, 0x23, 0x7a, 0xdb,
0x19, 0xbf, 0xcf, 0x7b, 0x9f, 0xf7, 0x63, 0x3e, 0xcf, 0x50, 0x15, 0x47, 0x51, 0x4a, 0x62, 0x4e,
0x68, 0x90, 0xa4, 0x5c, 0x72, 0xb7, 0xde, 0xcd, 0x3a, 0xf4, 0x50, 0x04, 0x9d, 0x3e, 0xef, 0x08,
0xc9, 0x53, 0x1a, 0x44, 0x09, 0x0b, 0x46, 0x56, 0x1b, 0xeb, 0x3d, 0xde, 0xe3, 0x68, 0xda, 0x50,
0x5f, 0x1a, 0xb5, 0xf1, 0x9e, 0x46, 0x35, 0x46, 0xa8, 0x46, 0x97, 0x0f, 0x06, 0x3c, 0x6e, 0x20,
0x90, 0xc5, 0xbd, 0x46, 0x1a, 0xc5, 0x3d, 0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 0x4b, 0xf8, 0x3a, 0x8b, 0xe8, 0x7f, 0x8d, 0x33, 0x7e, 0x95, 0x49,
0x14, 0xfb, 0x77, 0x6e, 0x69, 0x5c, 0xcd, 0xfe, 0x15, 0x7a, 0xff, 0x4e, 0x65, 0x7e, 0x0b, 0xca,
0x48, 0xc8, 0xec, 0xdf, 0x19, 0x52, 0xd7, 0xb8, 0x0b, 0xd7, 0xaf, 0x2c, 0xfe, 0xf5, 0x5d, 0x6b,
0x8f, 0x7f, 0xb2, 0x60, 0x2d, 0xa4, 0x32, 0x62, 0xf1, 0xb5, 0xbe, 0xcf, 0x75, 0x28, 0xf7, 0x69,
0x24, 0xf4, 0xe3, 0x74, 0x42, 0x7d, 0xf0, 0x7f, 0x54, 0x5b, 0x83, 0x46, 0xfd, 0x79, 0x52, 0xc1,
0xd7, 0x6a, 0x8f, 0x5f, 0xeb, 0x88, 0x5e, 0x69, 0x4c, 0xaf, 0xb9, 0xf1, 0x64, 0x58, 0xb7, 0xfe,
0x18, 0xd6, 0xad, 0x3f, 0x87, 0x75, 0xeb, 0x9b, 0xe5, 0xa0, 0x71, 0x73, 0xe4, 0xbf, 0x53, 0xc1,
0x06, 0x7f, 0xf0, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x91, 0xfb, 0x72, 0x4d, 0x10, 0x00,
0x00,
// 1034 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcb, 0x6e, 0x23, 0x45,
0x17, 0xfe, 0xdb, 0x6e, 0x3b, 0xf9, 0x4f, 0x1c, 0x9c, 0x14, 0x01, 0x59, 0x91, 0x70, 0x47, 0x3d,
0x20, 0x22, 0x2e, 0x6d, 0x29, 0x20, 0x58, 0x0c, 0x30, 0x19, 0xc7, 0x0a, 0x98, 0x30, 0x82, 0xe9,
0xcc, 0xcc, 0x02, 0x09, 0xa2, 0xb6, 0xbb, 0xe2,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, 0x9f, 0xd4, 0xd6, 0xa0, 0x41, 0x7f, 0x9e, 0x54, 0xf0, 0xb5, 0x16, 0xc6, 0xaf, 0x75, 0x44,
0xaf, 0x38, 0xa6, 0xd7, 0x5c, 0x7f, 0x3c, 0xac, 0x5b, 0x7f, 0x0d, 0xeb, 0xd6, 0xdf, 0xc3, 0xba,
0xf5, 0x6d, 0xc5, 0x6b, 0xdc, 0x1c, 0xf9, 0xef, 0x94, 0xb1, 0xc1, 0x1f, 0xfc, 0x1b, 0x00, 0x00,
0xff, 0xff, 0xda, 0xd8, 0x03, 0xa1, 0x9e, 0x10, 0x00, 0x00,
}
func (m *Item) Marshal() (dAtA []byte, err error) {
@ -2270,8 +2270,8 @@ func (m *AddShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Epoch != 0 {
i = encodeVarintShardnode(dAtA, i, uint64(m.Epoch))
if m.RouteVersion != 0 {
i = encodeVarintShardnode(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x28
}
@ -3180,8 +3180,8 @@ func (m *AddShardRequest) Size() (n int) {
n += 1 + l + sovShardnode(uint64(l))
}
}
if m.Epoch != 0 {
n += 1 + sovShardnode(uint64(m.Epoch))
if m.RouteVersion != 0 {
n += 1 + sovShardnode(uint64(m.RouteVersion))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
@ -4985,9 +4985,9 @@ func (m *AddShardRequest) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.Epoch = 0
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
@ -4997,7 +4997,7 @@ func (m *AddShardRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Epoch |= uint64(b&0x7F) << shift
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}

View File

@ -92,7 +92,7 @@ message AddShardRequest {
uint64 suid = 2 [(gogoproto.customname) = "Suid", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.Suid"];
cubefs.blobstore.common.sharding.Range range = 3 [(gogoproto.nullable) = false];
repeated cubefs.blobstore.api.clustermgr.ShardUnit units = 4 [(gogoproto.nullable) = false];
uint64 epoch = 5;
uint64 route_version = 5 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
}
message AddShardResponse {}

View File

@ -74,6 +74,25 @@ type FieldID uint32
type ShardTaskType uint8
const (
ShardTaskTypeClearShard = 1
ShardTaskTypeCheckpoint = 2
ShardTaskTypeClearShard = ShardTaskType(iota + 1)
ShardTaskTypeCheckpoint
ShardTaskTypeSyncRouteVersion
)
type ShardUnitStatus uint8
const (
ShardUnitStatusNormal = ShardUnitStatus(iota + 1)
ShardUnitStatusOffline
)
func (status ShardUnitStatus) String() string {
switch status {
case ShardUnitStatusNormal:
return "normal"
case ShardUnitStatusOffline:
return "offline"
default:
return "unknown"
}
}

View File

@ -34,7 +34,7 @@ func (s *service) AddShard(ctx context.Context, req *shardnode.AddShardRequest)
return err
}
return disk.AddShard(ctx, req.Suid, req.Epoch, req.Range, req.Units)
return disk.AddShard(ctx, req.Suid, req.RouteVersion, req.Range, req.Units)
}
// UpdateShard update shard info
@ -61,7 +61,7 @@ func (s *service) GetShardInfo(ctx context.Context, diskID proto.DiskID, suid pr
AppliedIndex: shardStat.AppliedIndex,
LeaderIdx: shardStat.LeaderIdx,
Range: shardStat.Range,
Epoch: shardStat.Epoch,
RouteVersion: shardStat.RouteVersion,
}, nil
}
@ -124,7 +124,7 @@ func (s *service) loop(ctx context.Context) {
AppliedIndex: stats.AppliedIndex,
LeaderIdx: stats.LeaderIdx,
Range: stats.Range,
Epoch: stats.Epoch,
RouteVersion: stats.RouteVersion,
})
return true
})
@ -163,7 +163,7 @@ func (s *service) executeShardTask(ctx context.Context, task clustermgr.ShardTas
switch task.TaskType {
case proto.ShardTaskTypeClearShard:
s.taskPool.Run(func() {
if shard.GetEpoch() == task.Epoch {
if shard.GetRouteVersion() == task.RouteVersion {
err := disk.DeleteShard(ctx, task.Suid)
if err != nil {
span.Errorf("delete shard task[%+v] failed: %s", task, err)

View File

@ -245,7 +245,7 @@ func (d *Disk) Load(ctx context.Context) error {
}
func (d *Disk) AddShard(ctx context.Context, suid proto.Suid,
epoch uint64, rg sharding.Range, nodes []clustermgr.ShardUnit,
routeVersion proto.RouteVersion, rg sharding.Range, nodes []clustermgr.ShardUnit,
) error {
span := trace.SpanFromContext(ctx)
@ -269,10 +269,10 @@ func (d *Disk) AddShard(ctx context.Context, suid proto.Suid,
}
}
shardInfo := &shardInfo{
ShardID: suid.ShardID(),
Range: rg,
Epoch: epoch,
Units: shardUnits,
ShardID: suid.ShardID(),
Range: rg,
RouteVersion: routeVersion,
Units: shardUnits,
}
shard, err := newShard(ctx, shardConfig{

View File

@ -137,7 +137,7 @@ func TestServerDisk_Shard(t *testing.T) {
s, err := d.d.GetShard(suid)
require.NoError(t, err)
require.Equal(t, uint64(1), s.GetEpoch())
require.Equal(t, proto.RouteVersion(1), s.GetRouteVersion())
shardID2 := proto.ShardID(2)
suid2 := proto.EncodeSuid(shardID2, 0, 0)

View File

@ -23,6 +23,7 @@ import (
reflect "reflect"
shardnode "github.com/cubefs/cubefs/blobstore/api/shardnode"
proto "github.com/cubefs/cubefs/blobstore/common/proto"
gomock "github.com/golang/mock/gomock"
)
@ -77,20 +78,6 @@ func (mr *MockSpaceShardHandlerMockRecorder) DeleteItem(ctx, h, id interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteItem", reflect.TypeOf((*MockSpaceShardHandler)(nil).DeleteItem), ctx, h, id)
}
// GetEpoch mocks base method.
func (m *MockSpaceShardHandler) GetEpoch() uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetEpoch")
ret0, _ := ret[0].(uint64)
return ret0
}
// GetEpoch indicates an expected call of GetEpoch.
func (mr *MockSpaceShardHandlerMockRecorder) GetEpoch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEpoch", reflect.TypeOf((*MockSpaceShardHandler)(nil).GetEpoch))
}
// GetItem mocks base method.
func (m *MockSpaceShardHandler) GetItem(ctx context.Context, h OpHeader, id []byte) (shardnode.Item, error) {
m.ctrl.T.Helper()
@ -106,6 +93,20 @@ func (mr *MockSpaceShardHandlerMockRecorder) GetItem(ctx, h, id interface{}) *go
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetItem", reflect.TypeOf((*MockSpaceShardHandler)(nil).GetItem), ctx, h, id)
}
// GetRouteVersion mocks base method.
func (m *MockSpaceShardHandler) GetRouteVersion() proto.RouteVersion {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRouteVersion")
ret0, _ := ret[0].(proto.RouteVersion)
return ret0
}
// GetRouteVersion indicates an expected call of GetRouteVersion.
func (mr *MockSpaceShardHandlerMockRecorder) GetRouteVersion() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRouteVersion", reflect.TypeOf((*MockSpaceShardHandler)(nil).GetRouteVersion))
}
// InsertItem mocks base method.
func (m *MockSpaceShardHandler) InsertItem(ctx context.Context, h OpHeader, i shardnode.Item) error {
m.ctrl.T.Helper()

View File

@ -44,7 +44,7 @@ type (
DeleteItem(ctx context.Context, h OpHeader, id []byte) error
GetItem(ctx context.Context, h OpHeader, id []byte) (shardnode.Item, error)
ListItem(ctx context.Context, h OpHeader, prefix, id []byte, count uint64) (items []shardnode.Item, nextMarker []byte, err error)
GetEpoch() uint64
GetRouteVersion() proto.RouteVersion
Checkpoint(ctx context.Context) error
Stats() ShardStats
}
@ -63,7 +63,7 @@ type (
Suid proto.Suid
AppliedIndex uint64
LeaderIdx uint32
Epoch uint64
RouteVersion proto.RouteVersion
Range sharding.Range
Units []shardUnitInfo
}
@ -339,11 +339,11 @@ func (s *shard) ListItem(ctx context.Context, h OpHeader, prefix, marker []byte,
return items, s.shardKeys.decodeItemKey(nextMarker), nil
}
func (s *shard) GetEpoch() uint64 {
func (s *shard) GetRouteVersion() proto.RouteVersion {
s.shardInfoMu.RLock()
epoch := s.shardInfoMu.Epoch
routeVersion := s.shardInfoMu.RouteVersion
s.shardInfoMu.RUnlock()
return epoch
return routeVersion
}
func (s *shard) Stats() ShardStats {
@ -354,7 +354,7 @@ func (s *shard) Stats() ShardStats {
s.shardInfoMu.RLock()
units := s.shardInfoMu.Units
epoch := s.shardInfoMu.Epoch
routeVersion := s.shardInfoMu.RouteVersion
leaderIdx := uint32(0)
appliedIndex := s.shardInfoMu.AppliedIndex
rg := s.shardInfoMu.Range
@ -369,7 +369,7 @@ func (s *shard) Stats() ShardStats {
Suid: s.suid,
AppliedIndex: appliedIndex,
LeaderIdx: leaderIdx,
Epoch: epoch,
RouteVersion: routeVersion,
Range: rg,
Units: units,
}