From 49fcb48e04e3b366b1a1d8bcbbaf79788707aca2 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 23 Jan 2024 19:39:59 -0800 Subject: [PATCH] same logic as grpc assign fix https://github.com/seaweedfs/seaweedfs/issues/5213 --- weed/server/master_grpc_server_volume.go | 5 ----- weed/server/master_server_handlers.go | 7 ------- weed/topology/volume_growth.go | 1 - 3 files changed, 13 deletions(-) diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index ba18ce649..a344e5221 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -61,11 +61,6 @@ func (ms *MasterServer) ProcessGrowRequest() { } vl.DoneGrowRequest() - if req.ErrCh != nil { - req.ErrCh <- err - close(req.ErrCh) - } - filter.Delete(req) }() diff --git a/weed/server/master_server_handlers.go b/weed/server/master_server_handlers.go index ccfb2e0c7..c5e059f21 100644 --- a/weed/server/master_server_handlers.go +++ b/weed/server/master_server_handlers.go @@ -135,17 +135,10 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request) writeJsonQuiet(w, r, http.StatusNotFound, operation.AssignResult{Error: "No free volumes left for " + option.String()}) return } - - errCh := make(chan error, 1) vl.AddGrowRequest() ms.vgCh <- &topology.VolumeGrowRequest{ Option: option, Count: writableVolumeCount, - ErrCh: errCh, - } - if err := <-errCh; err != nil { - writeJsonError(w, r, http.StatusInternalServerError, fmt.Errorf("cannot grow volume group! %v", err)) - return } } if err != nil { diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index 0d8893605..cf5690cec 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -29,7 +29,6 @@ This package is created to resolve these replica placement issues: type VolumeGrowRequest struct { Option *VolumeGrowOption Count int - ErrCh chan error } type VolumeGrowOption struct {