mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 01:07:54 +08:00
shell: do not need to lock to see volume -h
This commit is contained in:
@@ -33,10 +33,6 @@ func (c *commandVolumeDeleteEmpty) Help() string {
|
||||
|
||||
func (c *commandVolumeDeleteEmpty) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
volDeleteCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
quietPeriod := volDeleteCommand.Duration("quietFor", 24*time.Hour, "select empty volumes with no recent writes, avoid newly created ones")
|
||||
applyBalancing := volDeleteCommand.Bool("force", false, "apply to delete empty volumes")
|
||||
@@ -44,6 +40,10 @@ func (c *commandVolumeDeleteEmpty) Do(args []string, commandEnv *CommandEnv, wri
|
||||
return nil
|
||||
}
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// collect topology information
|
||||
topologyInfo, _, err := collectTopologyInfo(commandEnv)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user