mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 18:57:58 +08:00
add sortEcNodesByFreeslotsDecending and sortEcNodesByFreeslotsAscending
addressing https://github.com/chrislusf/seaweedfs/issues/1111
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user