diff options
| author | Lisandro Pin <lisandro.pin@proton.ch> | 2024-11-28 17:42:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-28 08:42:41 -0800 |
| commit | 9a741a61b195ccdf9815ab64dc9f0725f620f836 (patch) | |
| tree | a427f95963323112bcbf18588f5f59974e7c1aa0 /weed/shell/command_ec_common_test.go | |
| parent | 559a1fd0f4565bca3e2f4e6f0d90d188c7b3377a (diff) | |
| download | seaweedfs-9a741a61b195ccdf9815ab64dc9f0725f620f836.tar.xz seaweedfs-9a741a61b195ccdf9815ab64dc9f0725f620f836.zip | |
Display details upon failures to re-balance EC shards racks. (#6299)
Diffstat (limited to 'weed/shell/command_ec_common_test.go')
| -rw-r--r-- | weed/shell/command_ec_common_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/shell/command_ec_common_test.go b/weed/shell/command_ec_common_test.go index 5b4983413..08e4a41c7 100644 --- a/weed/shell/command_ec_common_test.go +++ b/weed/shell/command_ec_common_test.go @@ -122,7 +122,12 @@ func TestPickRackToBalanceShardsInto(t *testing.T) { rackToShardCount := countShardsByRack(vid, locations) averageShardsPerEcRack := ceilDivide(erasure_coding.TotalShardsCount, len(racks)) - got := pickRackToBalanceShardsInto(racks, rackToShardCount, nil, averageShardsPerEcRack) + got, gotErr := pickRackToBalanceShardsInto(racks, rackToShardCount, nil, averageShardsPerEcRack) + if gotErr != nil { + t.Errorf("volume %q: %s", tc.vid, gotErr.Error()) + continue + } + if string(got) == "" && len(tc.wantOneOf) == 0 { continue } |
