mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 16:37:56 +08:00
@@ -17,7 +17,7 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol
|
|||||||
|
|
||||||
return operation.WithVolumeServerClient(false, dn.ServerAddress(), grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
|
return operation.WithVolumeServerClient(false, dn.ServerAddress(), grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
|
||||||
|
|
||||||
_, deleteErr := client.AllocateVolume(context.Background(), &volume_server_pb.AllocateVolumeRequest{
|
_, allocateErr := client.AllocateVolume(context.Background(), &volume_server_pb.AllocateVolumeRequest{
|
||||||
VolumeId: uint32(vid),
|
VolumeId: uint32(vid),
|
||||||
Collection: option.Collection,
|
Collection: option.Collection,
|
||||||
Replication: option.ReplicaPlacement.String(),
|
Replication: option.ReplicaPlacement.String(),
|
||||||
@@ -26,7 +26,7 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol
|
|||||||
MemoryMapMaxSizeMb: option.MemoryMapMaxSizeMb,
|
MemoryMapMaxSizeMb: option.MemoryMapMaxSizeMb,
|
||||||
DiskType: string(option.DiskType),
|
DiskType: string(option.DiskType),
|
||||||
})
|
})
|
||||||
return deleteErr
|
return allocateErr
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -181,7 +181,7 @@ func (vg *VolumeGrowth) findEmptySlotsForOneVolume(topo *Topology, option *Volum
|
|||||||
return nil, rackErr
|
return nil, rackErr
|
||||||
}
|
}
|
||||||
|
|
||||||
//find main rack and other racks
|
//find main server and other servers
|
||||||
mainServer, otherServers, serverErr := mainRack.(*Rack).PickNodesByWeight(rp.SameRackCount+1, option, func(node Node) error {
|
mainServer, otherServers, serverErr := mainRack.(*Rack).PickNodesByWeight(rp.SameRackCount+1, option, func(node Node) error {
|
||||||
if option.DataNode != "" && node.IsDataNode() && node.Id() != NodeId(option.DataNode) {
|
if option.DataNode != "" && node.IsDataNode() && node.Id() != NodeId(option.DataNode) {
|
||||||
return fmt.Errorf("Not matching preferred data node:%s", option.DataNode)
|
return fmt.Errorf("Not matching preferred data node:%s", option.DataNode)
|
||||||
|
Reference in New Issue
Block a user