aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorLisandro Pin <lisandro.pin@proton.ch>2025-12-08 20:12:36 +0100
committerGitHub <noreply@github.com>2025-12-08 11:12:36 -0800
commitca1ad9c4c243b598c231942734372100979c5b6c (patch)
treec70018ad37c131408efe7459c07f607be29cba1b /weed
parent1856eaca03aa85895e4928042ad860a3097da5da (diff)
downloadseaweedfs-ca1ad9c4c243b598c231942734372100979c5b6c.tar.xz
seaweedfs-ca1ad9c4c243b598c231942734372100979c5b6c.zip
Nit: have `ec.encode` exit immediately if no volumes are processed. (#7654)
* Nit: have `ec.encode` exit immediately if no volumes are processed. * Update weed/shell/command_ec_encode.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Diffstat (limited to 'weed')
-rw-r--r--weed/shell/command_ec_encode.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go
index d6b6b17b3..355869767 100644
--- a/weed/shell/command_ec_encode.go
+++ b/weed/shell/command_ec_encode.go
@@ -124,6 +124,10 @@ func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Wr
return err
}
}
+ if len(volumeIds) == 0 {
+ fmt.Println("No volumes, nothing to do.")
+ return nil
+ }
// Collect volume locations BEFORE EC encoding starts to avoid race condition
// where the master metadata is updated after EC encoding but before deletion