aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-11-10 12:05:58 -0800
committerChris Lu <chris.lu@gmail.com>2019-11-10 12:05:58 -0800
commite6ab75972f4327a12bf5ce517cde8926247f384f (patch)
treefe7437ec88a27de34f05f668815409b98d81bbc1
parent471902cd516217789ca4246e7b9e833bcbe75f0b (diff)
downloadseaweedfs-e6ab75972f4327a12bf5ce517cde8926247f384f.tar.xz
seaweedfs-e6ab75972f4327a12bf5ce517cde8926247f384f.zip
use constant
-rw-r--r--weed/shell/command_ec_common.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go
index d0fe16a68..1e9d96212 100644
--- a/weed/shell/command_ec_common.go
+++ b/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