use constant

This commit is contained in:
Chris Lu 2019-11-10 12:05:58 -08:00
parent 471902cd51
commit e6ab75972f

View file

@ -156,7 +156,7 @@ func countShards(ecShardInfos []*master_pb.VolumeEcShardInformationMessage) (cou
}
func countFreeShardSlots(dn *master_pb.DataNodeInfo) (count int) {
return int(dn.FreeVolumeCount)*10 - countShards(dn.EcShardInfos)
return int(dn.FreeVolumeCount)*erasure_coding.DataShardsCount - countShards(dn.EcShardInfos)
}
type RackId string