[master] Do Automatic Volume Grow in background (#5781)

* Do Automatic Volume Grow in backgound

* pass lastGrowCount to master

* fix build

* fix count to uint64
This commit is contained in:
Konstantin Lebedev
2024-07-16 20:03:40 +05:00
committed by GitHub
parent ce61a66b65
commit 67edf1d014
8 changed files with 93 additions and 43 deletions

View File

@@ -107,7 +107,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
requestedCount = 1
}
writableVolumeCount, e := strconv.Atoi(r.FormValue("writableVolumeCount"))
writableVolumeCount, e := strconv.ParseUint(r.FormValue("writableVolumeCount"), 10, 32)
if e != nil {
writableVolumeCount = 0
}
@@ -145,7 +145,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
vl.AddGrowRequest()
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
Option: option,
Count: writableVolumeCount,
Count: uint32(writableVolumeCount),
}
}
if err != nil {