Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Check `ShouldGrowVolumes` before returning error in assign. (#5819)

Ruoxid15966ae8e1e
diff --git a/weed/server/master_grpc_server_assign.go b/weed/server/master_grpc_server_assign.go
index efde9eacbc..999a919a67 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() {
+ if shouldGrow && !vl.HasGrowRequest() && vl.ShouldGrowVolumes(option) {
// 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())