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

@@ -30,11 +30,11 @@ func (dn *DataNode) UpdateEcShards(actualShards []*erasure_coding.EcVolumeInfo)
} else {
// found, but maybe the actual shard could be missing
a := actualEcShards.Minus(ecShards)
if len(a.ShardIds()) > 0 {
if a.ShardIdCount() > 0 {
newShards = append(newShards, a)
}
d := ecShards.Minus(actualEcShards)
if len(d.ShardIds()) > 0 {
if d.ShardIdCount() > 0 {
deletedShards = append(deletedShards, d)
}
}