aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_common_test.go
AgeCommit message (Collapse)AuthorFilesLines
2025-02-28`ec.encode`: Fix resolution of target collections. (#6585)Lisandro Pin1-3/+3
* Don't ignore empty (`""`) collection names when computing collections for a given volume ID. * `ec.encode`: Fix resolution of target collections. When no `volumeId` parameter is provided, compute volumes based on the provided collection name, even if it's empty (`""`). This restores behavior to before recent EC rebalancing rework. See also https://github.com/seaweedfs/seaweedfs/blob/ec30a504bae6cad75f859964e14c60d39cc43709/weed/shell/command_ec_encode.go#L99 .
2025-02-28Fix calculation of node's free EC shard slots. (#6584)Lisandro Pin1-0/+90
2025-01-30Improve EC shards balancing logic regarding replica placement settings. (#6491)Lisandro Pin1-2/+2
The replica placement type specifies numebr of _replicas_ on the same/different rack; that means we can have one EC shard copy on each, even if the replica setting is zero. This PR reworks replica placement parsing for EC rebalancing, so we check allow (replica placement + 1) when selecting racks and nodes to balance EC shards into.
2024-12-12Limit EC re-balancing for `ec.encode` to relevant collections when a volume ↵Lisandro Pin1-0/+34
ID argument is provided. (#6347) Limit EC re-balancing for `ec.encode` to relevant collections when a volume ID is provided.
2024-12-10Unify the re-balancing logic for `ec.encode` with `ec.balance`. (#6339)Lisandro Pin1-0/+1
Among others, this enables recent changes related to topology aware re-balancing at EC encoding time.
2024-12-06Remove average constraints when selecting nodes/racks to balance EC shards ↵Lisandro Pin1-58/+2
into. (#6325)
2024-12-05Share common parameters for EC re-balancing functions under a single struct. ↵Lisandro Pin1-54/+43
(#6319) TODO cleanup for https://github.com/seaweedfs/seaweedfs/discussions/6179.
2024-12-04Account for replication placement settings when balancing EC shards within ↵Lisandro Pin1-24/+48
the same rack. (#6317) * Account for replication placement settings when balancing EC shards within racks. * Update help contents for `ec.balance`. * Add a few more representative test cases for `pickEcNodeToBalanceShardsInto()`.
2024-12-04Account for replication placement settings when balancing EC shards across ↵Lisandro Pin1-15/+20
racks. (#6316)
2024-12-02Resolve replica placement for EC volumes from master server defaults. (#6303)Lisandro Pin1-5/+48
2024-11-28Display details upon failures to re-balance EC shards racks. (#6299)Lisandro Pin1-1/+6
2024-11-27Improve EC shards rebalancing logic across nodes (#6297)Lisandro Pin1-12/+100
* Improve EC shards rebalancing logic across nodes. - Favor target nodes with less preexisting shards, to ensure a fair distribution. - Randomize selection when multiple possible target nodes are available. - Add logic to account for replication settings when selecting target nodes (currently disabled). * Fix minor test typo. * Clarify internal error messages for `pickEcNodeToBalanceShardsInto()`.
2024-11-21Improve EC shards rebalancing logic across racks (#6270)Lisandro Pin1-19/+65
Improve EC shards rebalancing logic across racks. - Favor target shards with less preexisting shards, to ensure a fair distribution. - Randomize selection when multiple possible target shards are available. - Add logic to account for replication settings when selecting target shards (currently disabled).
2024-11-18Introduce logic to resolve volume replica placement within EC rebalancing. ↵Lisandro Pin1-0/+87
(#6254) * Rename `command_ec_encode_test.go` to `command_ec_common_test.go`. All tests defined in this file are now for `command_ec_common.go`. * Minor code cleanups. - Fix broken `ec.balance` test. - Rework integer ceiling division to not use floats, which can introduce precision errors. * Introduce logic to resolve volume replica placement within EC rebalancing. This will be used to make rebalancing logic topology-aware. * Give shell.EcNode.dc a dedicated DataCenterId type.