aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_rebuild.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-11-12 13:47:36 -0800
committerChris Lu <chris.lu@gmail.com>2019-11-12 13:47:36 -0800
commit40514c53622fded6681f91d1c7d54045a5ef44c8 (patch)
treead96bbc923859f7c8a50b953f2377037f5feb717 /weed/shell/command_ec_rebuild.go
parentf056baa384f7c561574a7439d39b9746e52d7e23 (diff)
downloadseaweedfs-40514c53622fded6681f91d1c7d54045a5ef44c8.tar.xz
seaweedfs-40514c53622fded6681f91d1c7d54045a5ef44c8.zip
add sortEcNodesByFreeslotsDecending and sortEcNodesByFreeslotsAscending
addressing https://github.com/chrislusf/seaweedfs/issues/1111
Diffstat (limited to 'weed/shell/command_ec_rebuild.go')
-rw-r--r--weed/shell/command_ec_rebuild.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go
index 63b7c4088..b43aed599 100644
--- a/weed/shell/command_ec_rebuild.go
+++ b/weed/shell/command_ec_rebuild.go
@@ -111,7 +111,7 @@ func rebuildEcVolumes(commandEnv *CommandEnv, allEcNodes []*EcNode, collection s
return fmt.Errorf("ec volume %d is unrepairable with %d shards\n", vid, shardCount)
}
- sortEcNodes(allEcNodes)
+ sortEcNodesByFreeslotsDecending(allEcNodes)
if allEcNodes[0].freeEcSlot < erasure_coding.TotalShardsCount {
return fmt.Errorf("disk space is not enough")