mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 23:49:23 +08:00
fix: avoid timeout if datacenter does not exist in topology (#5772)
* fix: avoid timeout if datacenter does not exist in topology * fix: error msg * fix: rm dublicate check * fix: compare * revert minor change
This commit is contained in:

committed by
GitHub

parent
3a82f5ffad
commit
04f4b10884
@@ -69,6 +69,10 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
|
||||
MemoryMapMaxSizeMb: req.MemoryMapMaxSizeMb,
|
||||
}
|
||||
|
||||
if !ms.Topo.DataCenterExists(option.DataCenter) {
|
||||
return nil, fmt.Errorf("data center %v not found in topology", option.DataCenter)
|
||||
}
|
||||
|
||||
vl := ms.Topo.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType)
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user