From 93eff8fa453f525c68d1ddbacc08b0e8567b1c9f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 26 Feb 2026 00:26:40 -0800 Subject: [PATCH] Update weed/plugin/worker/ec_repair_handler.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- weed/plugin/worker/ec_repair_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/plugin/worker/ec_repair_handler.go b/weed/plugin/worker/ec_repair_handler.go index 2e05cc0be..b764fb5f9 100644 --- a/weed/plugin/worker/ec_repair_handler.go +++ b/weed/plugin/worker/ec_repair_handler.go @@ -410,8 +410,8 @@ func (h *EcRepairHandler) rebuildMissingShards(ctx context.Context, plan *ecrepa }); err != nil { return nil, err } - if len(rebuilt) == 0 { - rebuilt = append(rebuilt, plan.MissingShards...) +if len(rebuilt) == 0 && len(plan.MissingShards) > 0 { + return nil, fmt.Errorf("rebuild shards for volume %d completed but returned no rebuilt shard IDs", plan.VolumeID) } return rebuilt, nil }