From 5763c007f6cbc393a2344c1c9ea54b1f45b3da29 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 4 Dec 2025 15:16:16 -0800 Subject: [PATCH] fix: ensure partial EC volume moves are reported as failures Set hasMoved=false when a shard fails to move, even if previous shards succeeded. This prevents the caller from incorrectly assuming the entire volume was evacuated, which could lead to data loss if the source server is decommissioned based on this incorrect status. --- weed/shell/command_volume_server_evacuate.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/shell/command_volume_server_evacuate.go b/weed/shell/command_volume_server_evacuate.go index d962c047d..9925d0946 100644 --- a/weed/shell/command_volume_server_evacuate.go +++ b/weed/shell/command_volume_server_evacuate.go @@ -239,6 +239,8 @@ func (c *commandVolumeServerEvacuate) moveAwayOneEcVolume(commandEnv *CommandEnv fmt.Fprintf(writer, "no available destination for ec shard %d.%d: %d nodes have no free slots\n", ecShardInfo.Id, shardId, skippedNodes) } + // Ensure partial moves are reported as failures to prevent data loss + hasMoved = false return } }