mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-10 05:48:19 +01:00
move volume vacuum to gRpc
This commit is contained in:
1 parent
91ac2e0dd9
commit
b1daede91b
14 files changed
+469
-207
No files matched your search
@@ -37,9 +37,15 @@ func (ms *MasterServer) dirStatusHandler(w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
func (ms *MasterServer) volumeVacuumHandler(w http.ResponseWriter, r *http.Request) {
|
||||
gcThreshold := r.FormValue("garbageThreshold")
|
||||
if gcThreshold == "" {
|
||||
gcThreshold = ms.garbageThreshold
|
||||
gcString := r.FormValue("garbageThreshold")
|
||||
gcThreshold := ms.garbageThreshold
|
||||
if gcString != "" {
|
||||
var err error
|
||||
gcThreshold, err = strconv.ParseFloat(gcString, 32)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("garbageThreshold %s is not a valid float number: %v", gcString, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
glog.Infoln("garbageThreshold =", gcThreshold)
|
||||
ms.Topo.Vacuum(gcThreshold, ms.preallocate)
|
||||
|
||||
Reference in new issue
Block a user