From ebb1c9aec634437292438bf4b7b3432cbe0834ec Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 26 Jul 2024 11:21:01 -0700 Subject: [PATCH] Revert "Check `ShouldGrowVolumes` before returning error in assign. (#5819)" This reverts commit d15966ae8e1e01b6b096360f23ffef56b520c0d2. --- weed/server/master_grpc_server_assign.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/master_grpc_server_assign.go b/weed/server/master_grpc_server_assign.go index 999a919a6..efde9eacb 100644 --- a/weed/server/master_grpc_server_assign.go +++ b/weed/server/master_grpc_server_assign.go @@ -84,7 +84,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() && vl.ShouldGrowVolumes(option) { + if shouldGrow && !vl.HasGrowRequest() { // if picked volume is almost full, trigger a volume-grow request if ms.Topo.AvailableSpaceFor(option) <= 0 { return nil, fmt.Errorf("no free volumes left for " + option.String())