mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-17 04:36:50 +00:00
* shell: move ErrorWaitGroup to weed/util * shell: remove unused CandidateEcNode and EcRack types * ec: extract EC orchestration logic from weed/shell into weed/ec Move the EC node/topology model, balance engine, encode pipeline, decode pipeline, and rebuild engine into a new weed/ec package so shell commands and maintenance workers can share the logic. Shell commands keep flag parsing and delegate through a small ec.Env (dial option, topology fetch, volume locations, lock check). Tests move along with the code. * shell: remove unused proportional-rebalance type stubs * ec: move scrub, replication check, and shard unmount engines into weed/ec * worker: share the EC generation-aware shard counter from weed/ec * ec: gofmt * shell: drop EC aliases with no remaining callers * ec: guard a missing topology hook and nil disk entries in topology helpers * ec: drop trailing newlines from decode error strings * ec: re-check the shell lock before applying shard unmounts * shell: trim -node entries in ec.scrub
23 lines
754 B
Go
23 lines
754 B
Go
package shell
|
|
|
|
import (
|
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
|
)
|
|
|
|
var (
|
|
// Default maximum parallelization/concurrency for commands supporting it.
|
|
DefaultMaxParallelization = 10
|
|
// Default number of volumes EC encode/decode process per batch.
|
|
DefaultEcBatchSize = 10
|
|
// CollectionDefault is the special keyword to match empty collection names.
|
|
// Use "_default" to avoid collision with a literal collection named "default".
|
|
CollectionDefault = "_default"
|
|
)
|
|
|
|
// ErrorWaitGroup lives in weed/util so packages outside the shell can share it.
|
|
type ErrorWaitGroup = util.ErrorWaitGroup
|
|
type ErrorWaitGroupTask = util.ErrorWaitGroupTask
|
|
|
|
var NewErrorWaitGroup = util.NewErrorWaitGroup
|
|
var executeParallelTaskGroups = util.ExecuteParallelTaskGroups
|