aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_list_test.go
diff options
context:
space:
mode:
authorLisandro Pin <lisandro.pin@proton.ch>2024-11-21 17:46:24 +0100
committerGitHub <noreply@github.com>2024-11-21 08:46:24 -0800
commitca499de1cbd43b8a1bcdcbf2d62d137a7557bbc6 (patch)
tree75da93dfa4eb54036e88fef9d4371efe5a59ebd9 /weed/shell/command_volume_list_test.go
parente56327e3b0c741a7cf3c09d766814a2168a2720f (diff)
downloadseaweedfs-ca499de1cbd43b8a1bcdcbf2d62d137a7557bbc6.tar.xz
seaweedfs-ca499de1cbd43b8a1bcdcbf2d62d137a7557bbc6.zip
Improve EC shards rebalancing logic across racks (#6270)
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).
Diffstat (limited to 'weed/shell/command_volume_list_test.go')
-rw-r--r--weed/shell/command_volume_list_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/weed/shell/command_volume_list_test.go b/weed/shell/command_volume_list_test.go
index 1c8368229..4d67ada01 100644
--- a/weed/shell/command_volume_list_test.go
+++ b/weed/shell/command_volume_list_test.go
@@ -2,15 +2,18 @@ package shell
import (
_ "embed"
+
"github.com/seaweedfs/seaweedfs/weed/storage/erasure_coding"
"github.com/seaweedfs/seaweedfs/weed/storage/types"
"github.com/stretchr/testify/assert"
+
//"google.golang.org/protobuf/proto"
- "github.com/golang/protobuf/proto"
"strconv"
"strings"
"testing"
+ "github.com/golang/protobuf/proto"
+
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
)
@@ -127,3 +130,6 @@ var topoData string
//go:embed volume.list2.txt
var topoData2 string
+
+//go:embed volume.ecshards.txt
+var topoDataEc string