Browse Source

use constant

pull/1115/head
Chris Lu 5 years ago
parent
commit
e6ab75972f
  1. 2
      weed/shell/command_ec_common.go

2
weed/shell/command_ec_common.go

@ -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

Loading…
Cancel
Save