diff options
| author | chrislu <chris.lu@gmail.com> | 2022-02-08 01:51:13 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-02-08 01:51:13 -0800 |
| commit | 21aaa4c1f1c85486b5148605f8cb15db3f870be2 (patch) | |
| tree | 824c6c4353e92f9e77a3225ab01081d47c5543cf /weed/shell/command_ec_common.go | |
| parent | 13f6ec1c4e7737c1e6aaa486a80247b7cabf0448 (diff) | |
| download | seaweedfs-21aaa4c1f1c85486b5148605f8cb15db3f870be2.tar.xz seaweedfs-21aaa4c1f1c85486b5148605f8cb15db3f870be2.zip | |
ec.encode: calculate free ec slots based on (maxVolumeCount-volumeCount)
fix https://github.com/chrislusf/seaweedfs/issues/2642
Diffstat (limited to 'weed/shell/command_ec_common.go')
| -rw-r--r-- | weed/shell/command_ec_common.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go index 3ca310b5d..b3bd0ce5d 100644 --- a/weed/shell/command_ec_common.go +++ b/weed/shell/command_ec_common.go @@ -172,7 +172,7 @@ func countFreeShardSlots(dn *master_pb.DataNodeInfo, diskType types.DiskType) (c if diskInfo == nil { 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 |
