aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_balance.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-11-11 21:30:14 -0800
committerChris Lu <chris.lu@gmail.com>2019-11-11 21:30:14 -0800
commitee90236a972acea8722dccfa1b04926d551fc82d (patch)
tree7890d2482177caad2fa72b741435bcefff140cf3 /weed/shell/command_ec_balance.go
parent85f8649320033a46e71b20a588930013c00b3fdf (diff)
parentd7852ebb3b8900baeff3d806f8fe2404c511aa5d (diff)
downloadseaweedfs-ee90236a972acea8722dccfa1b04926d551fc82d.tar.xz
seaweedfs-ee90236a972acea8722dccfa1b04926d551fc82d.zip
Merge branch 'master' into refactoring_dat_backend
Diffstat (limited to 'weed/shell/command_ec_balance.go')
-rw-r--r--weed/shell/command_ec_balance.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go
index 47ae7bad3..8bf993f4a 100644
--- a/weed/shell/command_ec_balance.go
+++ b/weed/shell/command_ec_balance.go
@@ -266,6 +266,10 @@ func doBalanceEcShardsAcrossRacks(ctx context.Context, commandEnv *CommandEnv, c
for shardId, ecNode := range ecShardsToMove {
rackId := pickOneRack(racks, rackToShardCount, averageShardsPerEcRack)
+ if rackId == "" {
+ fmt.Printf("ec shard %d.%d at %s can not find a destination rack\n", vid, shardId, ecNode.info.Id)
+ continue
+ }
var possibleDestinationEcNodes []*EcNode
for _, n := range racks[rackId].ecNodes {
possibleDestinationEcNodes = append(possibleDestinationEcNodes, n)