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

@@ -89,7 +89,7 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
for time.Now().Sub(startTime) < maxTimeout {
fid, count, dnList, shouldGrow, err := ms.Topo.PickForWrite(req.Count, option, vl)
if shouldGrow && !vl.HasGrowRequest() {
if shouldGrow && !vl.HasGrowRequest() && !ms.option.VolumeGrowthDisabled {
if err != nil && ms.Topo.AvailableSpaceFor(option) <= 0 {
err = fmt.Errorf("%s and no free volumes left for %s", err.Error(), option.String())
}