diff options
| author | Lisandro Pin <lisandro.pin@proton.ch> | 2024-12-12 18:14:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-12 09:14:44 -0800 |
| commit | b0210df08151e32cb67d5199008870f5fc25827a (patch) | |
| tree | 28cbfebbe2289ee4059fde4eed16a741c820110c /weed/shell/command_ec_balance.go | |
| parent | 23ffbb083c4bcc9d723ce5857e08f85e7205140a (diff) | |
| download | seaweedfs-b0210df08151e32cb67d5199008870f5fc25827a.tar.xz seaweedfs-b0210df08151e32cb67d5199008870f5fc25827a.zip | |
Begin implementing EC balancing parallelization support. (#6342)
* Begin implementing EC balancing parallelization support.
Impacts both `ec.encode` and `ec.balance`,
* Nit: improve type naming.
* Make the goroutine workgroup handler for `EcBalance()` a bit smarter/error-proof.
* Nit: unify naming for `ecBalancer` wait group methods with the rest of the module.
* Fix concurrency bug.
* Fix whitespace after Gitlab automerge.
* Delete stray TODO.
Diffstat (limited to 'weed/shell/command_ec_balance.go')
| -rw-r--r-- | weed/shell/command_ec_balance.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go index 9e27f40ce..31782b279 100644 --- a/weed/shell/command_ec_balance.go +++ b/weed/shell/command_ec_balance.go @@ -17,7 +17,6 @@ func (c *commandEcBalance) Name() string { return "ec.balance" } -// TODO: Update help string and move to command_ec_common.go once shard replica placement logic is enabled. func (c *commandEcBalance) Help() string { return `balance all ec shards among all racks and volume servers @@ -36,6 +35,7 @@ func (c *commandEcBalance) Do(args []string, commandEnv *CommandEnv, writer io.W collection := balanceCommand.String("collection", "EACH_COLLECTION", "collection name, or \"EACH_COLLECTION\" for each collection") dc := balanceCommand.String("dataCenter", "", "only apply the balancing for this dataCenter") shardReplicaPlacement := balanceCommand.String("shardReplicaPlacement", "", "replica placement for EC shards, or master default if empty") + parallelize := balanceCommand.Bool("parallelize", true, "parallelize operations whenever possible") applyBalancing := balanceCommand.Bool("force", false, "apply the balancing plan") if err = balanceCommand.Parse(args); err != nil { return nil @@ -62,5 +62,5 @@ func (c *commandEcBalance) Do(args []string, commandEnv *CommandEnv, writer io.W return err } - return EcBalance(commandEnv, collections, *dc, rp, *applyBalancing) + return EcBalance(commandEnv, collections, *dc, rp, *parallelize, *applyBalancing) } |
