mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-09-18 23:10:35 +02:00
Merge branch 'master' into mq-subscribe
This commit is contained in:
commit
a8ddbf9ed2
|
@ -61,11 +61,6 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||||
}
|
}
|
||||||
vl.DoneGrowRequest()
|
vl.DoneGrowRequest()
|
||||||
|
|
||||||
if req.ErrCh != nil {
|
|
||||||
req.ErrCh <- err
|
|
||||||
close(req.ErrCh)
|
|
||||||
}
|
|
||||||
|
|
||||||
filter.Delete(req)
|
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()})
|
writeJsonQuiet(w, r, http.StatusNotFound, operation.AssignResult{Error: "No free volumes left for " + option.String()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
errCh := make(chan error, 1)
|
|
||||||
vl.AddGrowRequest()
|
vl.AddGrowRequest()
|
||||||
ms.vgCh <- &topology.VolumeGrowRequest{
|
ms.vgCh <- &topology.VolumeGrowRequest{
|
||||||
Option: option,
|
Option: option,
|
||||||
Count: writableVolumeCount,
|
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 {
|
if err != nil {
|
||||||
|
|
|
@ -29,7 +29,6 @@ This package is created to resolve these replica placement issues:
|
||||||
type VolumeGrowRequest struct {
|
type VolumeGrowRequest struct {
|
||||||
Option *VolumeGrowOption
|
Option *VolumeGrowOption
|
||||||
Count int
|
Count int
|
||||||
ErrCh chan error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type VolumeGrowOption struct {
|
type VolumeGrowOption struct {
|
||||||
|
|
Loading…
Reference in a new issue