mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 11:07:45 +08:00
prepare to register ec shard info in master
This commit is contained in:
@@ -12,6 +12,13 @@ type EcVolumeInfo struct {
|
||||
shardIds uint16 // use bits to indicate the shard id
|
||||
}
|
||||
|
||||
func NewEcVolumeInfo(collection string, vid needle.VolumeId) *EcVolumeInfo {
|
||||
return &EcVolumeInfo{
|
||||
Collection: collection,
|
||||
VolumeId: vid,
|
||||
}
|
||||
}
|
||||
|
||||
func (ecInfo *EcVolumeInfo) AddShardId(id ShardId) {
|
||||
ecInfo.shardIds |= (1 << id)
|
||||
}
|
||||
|
Reference in New Issue
Block a user