From c07596691c5897a171aefd09c37a5f4a1807b510 Mon Sep 17 00:00:00 2001 From: Lisandro Pin Date: Fri, 28 Feb 2025 20:42:19 +0100 Subject: `ec.encode`: Fix resolution of target collections. (#6585) * 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 . --- weed/shell/command_ec_common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'weed/shell/command_ec_common.go') diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go index f2845224e..c49ab7611 100644 --- a/weed/shell/command_ec_common.go +++ b/weed/shell/command_ec_common.go @@ -248,14 +248,14 @@ func collectCollectionsForVolumeIds(t *master_pb.TopologyInfo, vids []needle.Vol for _, diskInfo := range dn.DiskInfos { for _, vi := range diskInfo.VolumeInfos { for _, vid := range vids { - if needle.VolumeId(vi.Id) == vid && vi.Collection != "" { + if needle.VolumeId(vi.Id) == vid { found[vi.Collection] = true } } } for _, ecs := range diskInfo.EcShardInfos { for _, vid := range vids { - if needle.VolumeId(ecs.Id) == vid && ecs.Collection != "" { + if needle.VolumeId(ecs.Id) == vid { found[ecs.Collection] = true } } -- cgit v1.2.3