allocate ec shards to volume servers

This commit is contained in:
Chris Lu
2019-05-25 02:02:44 -07:00
parent 6f4b09b6a4
commit f0e6574d5e
6 changed files with 172 additions and 14 deletions

View File

@@ -7,11 +7,9 @@ import (
"github.com/chrislusf/seaweedfs/weed/storage/needle"
)
const shardCount = erasure_coding.DataShardsCount + erasure_coding.ParityShardsCount
type EcShardLocations struct {
Collection string
locations [shardCount][]*DataNode
locations [erasure_coding.TotalShardsCount][]*DataNode
}
func (t *Topology) SyncDataNodeEcShards(shardInfos []*master_pb.VolumeEcShardInformationMessage, dn *DataNode) (newShards, deletedShards []*erasure_coding.EcVolumeInfo) {