add disable volume_growth flag (#7196)

This commit is contained in:
Dmitriy Pavlov
2025-09-04 15:39:56 +03:00
committed by GitHub
parent e030530aab
commit cd78e653e1
5 changed files with 11 additions and 2 deletions

View File

@@ -142,7 +142,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
for time.Since(startTime) < maxTimeout {
fid, count, dnList, shouldGrow, err := ms.Topo.PickForWrite(requestedCount, option, vl)
if shouldGrow && !vl.HasGrowRequest() {
if shouldGrow && !vl.HasGrowRequest() && !ms.option.VolumeGrowthDisabled {
glog.V(0).Infof("dirAssign volume growth %v from %v", option.String(), r.RemoteAddr)
if err != nil && ms.Topo.AvailableSpaceFor(option) <= 0 {
err = fmt.Errorf("%s and no free volumes left for %s", err.Error(), option.String())