mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-10 18:34:45 +08:00
ec.encode: calculate free ec slots based on (maxVolumeCount-volumeCount)
fix https://github.com/chrislusf/seaweedfs/issues/2642
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user