From 20e5952c3506cda0517f3098f8501b6a4a9568b0 Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Thu, 15 Jan 2026 23:07:42 +0500 Subject: [PATCH] fix c.capacityByFunc is nil --- weed/shell/command_volume_balance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go index 0643b9bde..bdf91b32e 100644 --- a/weed/shell/command_volume_balance.go +++ b/weed/shell/command_volume_balance.go @@ -121,9 +121,9 @@ func (c *commandVolumeBalance) Do(args []string, commandEnv *CommandEnv, writer } return fmt.Errorf("use \"ALL\", \"ACTIVE\" or \"FULL\"") }) + c.capacityByFunc = capacityByMaxVolumeCount balanceCommand.Func("capacityBy", "capacityBy function name use \"MAX_VOLUME_COUNT\", \"FREE_VOLUME_COUNT\" and \"MIN_VOLUME_DENSITY\"", func(flagValue string) error { if flagValue == "" { - c.capacityByFunc = capacityByMaxVolumeCount return nil } for allowed, allowedCapacityByFunc := range allowedCapacityBy {