mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
ec.encode: calculate free ec slots based on (maxVolumeCount-volumeCount)
fix https://github.com/chrislusf/seaweedfs/issues/2642
This commit is contained in:
parent
13f6ec1c4e
commit
21aaa4c1f1
|
@ -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…
Reference in a new issue