mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-28 13:31:27 +08:00
same logic as grpc assign
fix https://github.com/seaweedfs/seaweedfs/issues/5213
This commit is contained in:
parent
439377b7a0
commit
49fcb48e04
@ -61,11 +61,6 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||
}
|
||||
vl.DoneGrowRequest()
|
||||
|
||||
if req.ErrCh != nil {
|
||||
req.ErrCh <- err
|
||||
close(req.ErrCh)
|
||||
}
|
||||
|
||||
filter.Delete(req)
|
||||
}()
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user