mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 06:30:07 +08:00
fix rack_not_found case
fix rack_not_found in https://github.com/chrislusf/seaweedfs/issues/1111
This commit is contained in:
parent
e6ab75972f
commit
9c2f3b1b0f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user