From 630dc8aee17feaedce53f15d423b75f16bd9a3fe Mon Sep 17 00:00:00 2001 From: "user.email" Date: Sun, 25 Oct 2026 03:24:39 -0700 Subject: [PATCH] master: reject an unparseable allocation_deferral instead of disabling the hold Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- weed/server/master_server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weed/server/master_server.go b/weed/server/master_server.go index 1634f4b8f6..0fe35ccf2e 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -176,7 +176,11 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se v.GetBool("master.volume_growth.freeze_on_topology_mismatch"), v.GetDuration("master.volume_growth.state_loss_recovery_wait")) if str := strings.TrimSpace(v.GetString("master.volume_growth.allocation_deferral")); str != "" { - ms.Topo.SetAllocationDeferral(v.GetDuration("master.volume_growth.allocation_deferral")) + if d, err := time.ParseDuration(str); err != nil { + glog.Warningf("invalid master.volume_growth.allocation_deferral %q: %v", str, err) + } else { + ms.Topo.SetAllocationDeferral(d) + } } ms.Topo.QuarantineVolumeFn = func(dn *topology.DataNode, vid needle.VolumeId, readOnly bool) error { err := operation.WithVolumeServerClient(false, dn.ServerAddress(), ms.grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {