Browse Source

ec.encode: calculate free ec slots based on (maxVolumeCount-volumeCount)

fix https://github.com/chrislusf/seaweedfs/issues/2642
pull/2652/head
chrislu 3 years ago
parent
commit
21aaa4c1f1
  1. 2
      weed/shell/command_ec_common.go

2
weed/shell/command_ec_common.go

@ -172,7 +172,7 @@ func countFreeShardSlots(dn *master_pb.DataNodeInfo, diskType types.DiskType) (c
if diskInfo == nil { if diskInfo == nil {
return 0 return 0
} }
return int(diskInfo.MaxVolumeCount-diskInfo.ActiveVolumeCount)*erasure_coding.DataShardsCount - countShards(diskInfo.EcShardInfos)
return int(diskInfo.MaxVolumeCount-diskInfo.VolumeCount)*erasure_coding.DataShardsCount - countShards(diskInfo.EcShardInfos)
} }
type RackId string type RackId string

Loading…
Cancel
Save