SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Nit: unify the default `--maxParallelization` value for `weed shell` commands supporting this option (#6788)
Lisandro Pin0be020b0fab7
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.goindex 08bbd2a227..96c59f9dae 100644--- a/weed/shell/command_ec_balance.go+++ b/weed/shell/command_ec_balance.go@@ -35,7 +35,7 @@ func (c *commandEcBalance) Do(args []string, commandEnv *CommandEnv, writer io.Wcollection := 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")- maxParallelization := balanceCommand.Int("maxParallelization", 10, "run up to X tasks in parallel, whenever possible")+ maxParallelization := balanceCommand.Int("maxParallelization", DefaultMaxParallelization, "run up to X tasks in parallel, whenever possible")applyBalancing := balanceCommand.Bool("force", false, "apply the balancing plan")if err = balanceCommand.Parse(args); err != nil {return nildiff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.goindex d9e3a88c62..db2fac4698 100644--- a/weed/shell/command_ec_encode.go+++ b/weed/shell/command_ec_encode.go@@ -66,7 +66,7 @@ func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Wrcollection := encodeCommand.String("collection", "", "the collection name")fullPercentage := encodeCommand.Float64("fullPercent", 95, "the volume reaches the percentage of max volume size")quietPeriod := encodeCommand.Duration("quietFor", time.Hour, "select volumes without no writes for this period")- maxParallelization := encodeCommand.Int("maxParallelization", 10, "run up to X tasks in parallel, whenever possible")+ maxParallelization := encodeCommand.Int("maxParallelization", DefaultMaxParallelization, "run up to X tasks in parallel, whenever possible")forceChanges := encodeCommand.Bool("force", false, "force the encoding even if the cluster has less than recommended 4 nodes")shardReplicaPlacement := encodeCommand.String("shardReplicaPlacement", "", "replica placement for EC shards, or master default if empty")applyBalancing := encodeCommand.Bool("rebalance", false, "re-balance EC shards after creation")diff --git a/weed/shell/common.go b/weed/shell/common.goindex 9fe190b314..43571176eb 100644--- a/weed/shell/common.go+++ b/weed/shell/common.go@@ -5,6 +5,11 @@ import ("sync")+var (+ // Default maximum parallelization/concurrency for commands supporting it.+ DefaultMaxParallelization = 10+)+// ErrorWaitGroup implements a goroutine wait group which aggregates errors, if any.type ErrorWaitGroup struct {maxConcurrency int