aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_balance_test.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2024-12-13 11:10:00 +0200
committerGitHub <noreply@github.com>2024-12-13 01:10:00 -0800
commit0a4b1909a250eed817f01209f20e06b72ffbb2cf (patch)
treea52b16b8995deb7b05da2bf61d835ac0d12d8c02 /weed/shell/command_volume_balance_test.go
parent9987a65e8aa11a54781a6e5bae774e13748e0452 (diff)
downloadseaweedfs-0a4b1909a250eed817f01209f20e06b72ffbb2cf.tar.xz
seaweedfs-0a4b1909a250eed817f01209f20e06b72ffbb2cf.zip
[shell] only apply the balancing for writable volumes (#6346)
Diffstat (limited to 'weed/shell/command_volume_balance_test.go')
-rw-r--r--weed/shell/command_volume_balance_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_volume_balance_test.go b/weed/shell/command_volume_balance_test.go
index 6c4b2a818..3dffb1d7d 100644
--- a/weed/shell/command_volume_balance_test.go
+++ b/weed/shell/command_volume_balance_test.go
@@ -255,8 +255,8 @@ func TestBalance(t *testing.T) {
volumeServers := collectVolumeServersByDcRackNode(topologyInfo, "", "", "")
volumeReplicas, _ := collectVolumeReplicaLocations(topologyInfo)
diskTypes := collectVolumeDiskTypes(topologyInfo)
-
- if err := balanceVolumeServers(nil, diskTypes, volumeReplicas, volumeServers, "ALL_COLLECTIONS", false); err != nil {
+ c := &commandVolumeBalance{}
+ if err := c.balanceVolumeServers(diskTypes, volumeReplicas, volumeServers, "ALL_COLLECTIONS"); err != nil {
t.Errorf("balance: %v", err)
}