mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-08 15:41:15 +02:00
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>
This commit is contained in:
co-authored by
coderabbitai[bot]
Chris Lu
parent
1856eaca03
commit
ca1ad9c4c2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user