mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-20 23:07:23 +08:00
return error when garbageThreshold is not a valid float number
Signed-off-by: Lei Liu <lei01.liu@horizon.ai>
This commit is contained in:
@@ -57,6 +57,7 @@ func (ms *MasterServer) volumeVacuumHandler(w http.ResponseWriter, r *http.Reque
|
|||||||
gcThreshold, err = strconv.ParseFloat(gcString, 32)
|
gcThreshold, err = strconv.ParseFloat(gcString, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(0).Infof("garbageThreshold %s is not a valid float number: %v", gcString, err)
|
glog.V(0).Infof("garbageThreshold %s is not a valid float number: %v", gcString, err)
|
||||||
|
writeJsonError(w, r, http.StatusNotAcceptable, fmt.Errorf("garbageThreshold %s is not a valid float number", gcString))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user