diff options
| author | chrislu <chris.lu@gmail.com> | 2022-05-10 00:01:46 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-05-10 00:01:46 -0700 |
| commit | 25559eeb923eecd360eaa61d21c10d87d2b9128f (patch) | |
| tree | 846a4a7afdb0a2fdf7622beaf61da211ed1ba876 /weed | |
| parent | 791c29ae9327c23157a2328433d64ffa491bd83b (diff) | |
| parent | 8ac959e41ba1a703097037bd6b22c70cf66f3e9f (diff) | |
| download | seaweedfs-25559eeb923eecd360eaa61d21c10d87d2b9128f.tar.xz seaweedfs-25559eeb923eecd360eaa61d21c10d87d2b9128f.zip | |
Merge branch 'master' of https://github.com/chrislusf/seaweedfs
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/topology/allocate_volume.go | 4 | ||||
| -rw-r--r-- | weed/topology/volume_growth.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go index e1ae30c2d..f21d0fc0a 100644 --- a/weed/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -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 { - _, deleteErr := client.AllocateVolume(context.Background(), &volume_server_pb.AllocateVolumeRequest{ + _, allocateErr := client.AllocateVolume(context.Background(), &volume_server_pb.AllocateVolumeRequest{ VolumeId: uint32(vid), Collection: option.Collection, Replication: option.ReplicaPlacement.String(), @@ -26,7 +26,7 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol MemoryMapMaxSizeMb: option.MemoryMapMaxSizeMb, DiskType: string(option.DiskType), }) - return deleteErr + return allocateErr }) } diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index e2949848d..7886c3998 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -181,7 +181,7 @@ func (vg *VolumeGrowth) findEmptySlotsForOneVolume(topo *Topology, option *Volum 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 { if option.DataNode != "" && node.IsDataNode() && node.Id() != NodeId(option.DataNode) { return fmt.Errorf("Not matching preferred data node:%s", option.DataNode) |
