Browse Source

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>
pull/7669/head
Lisandro Pin 4 weeks ago
committed by GitHub
parent
commit
ca1ad9c4c2
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      weed/shell/command_ec_encode.go

4
weed/shell/command_ec_encode.go

@ -124,6 +124,10 @@ func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Wr
return err 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 // Collect volume locations BEFORE EC encoding starts to avoid race condition
// where the master metadata is updated after EC encoding but before deletion // where the master metadata is updated after EC encoding but before deletion

Loading…
Cancel
Save