diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-05-25 02:02:44 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-05-25 02:02:44 -0700 |
| commit | f0e6574d5ed03446b9b221653b20618c0e11b381 (patch) | |
| tree | d54d1ce0fd6254ee9dc0a3b050e336d74a68885e /weed/topology/data_node_ec.go | |
| parent | 6f4b09b6a46f63eaebbbc23198d3ec73754ed11d (diff) | |
| download | seaweedfs-f0e6574d5ed03446b9b221653b20618c0e11b381.tar.xz seaweedfs-f0e6574d5ed03446b9b221653b20618c0e11b381.zip | |
allocate ec shards to volume servers
Diffstat (limited to 'weed/topology/data_node_ec.go')
| -rw-r--r-- | weed/topology/data_node_ec.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/topology/data_node_ec.go b/weed/topology/data_node_ec.go index e8ead5511..63c8f2127 100644 --- a/weed/topology/data_node_ec.go +++ b/weed/topology/data_node_ec.go @@ -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) } } |
