aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-08-03 23:10:28 -0700
committerGitHub <noreply@github.com>2025-08-03 23:10:28 -0700
commit365d03ff324730cb89f1faf28278ffdc32ca27b4 (patch)
tree28f4371ea8c73036005a1aeb260c9ce7cc63292c
parent513ac58504a2782d65a313e4154bbc7e8a505995 (diff)
downloadseaweedfs-365d03ff324730cb89f1faf28278ffdc32ca27b4.tar.xz
seaweedfs-365d03ff324730cb89f1faf28278ffdc32ca27b4.zip
mount ec shards correctly (#7079)
-rw-r--r--weed/shell/command_ec_encode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go
index da96492ae..d8891b28a 100644
--- a/weed/shell/command_ec_encode.go
+++ b/weed/shell/command_ec_encode.go
@@ -202,8 +202,8 @@ func doEcEncode(commandEnv *CommandEnv, collection string, volumeIds []needle.Vo
}
ewg.Reset()
- for _, vid := range volumeIds {
- target := locations[vid][0]
+ for i, vid := range volumeIds {
+ target := locations[vid][i%len(locations[vid])]
ewg.Add(func() error {
if err := mountEcShards(commandEnv.option.GrpcDialOption, collection, vid, target.ServerAddress(), shardIds); err != nil {
return fmt.Errorf("mount ec shards for volume %d on %s: %v", vid, target.Url, err)