aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_configure_replication.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-09-13 22:13:34 -0700
committerChris Lu <chris.lu@gmail.com>2021-09-13 22:13:34 -0700
commit119d5908dd52b159c275bad10007daaf62188df0 (patch)
tree3467183cb6cc5c832fedd1519fe3dcb377aa5f25 /weed/shell/command_volume_configure_replication.go
parent7504be58f9fc7683869e164bc710b3e83da12e2f (diff)
downloadseaweedfs-119d5908dd52b159c275bad10007daaf62188df0.tar.xz
seaweedfs-119d5908dd52b159c275bad10007daaf62188df0.zip
shell: do not need to lock to see volume -h
Diffstat (limited to 'weed/shell/command_volume_configure_replication.go')
-rw-r--r--weed/shell/command_volume_configure_replication.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_configure_replication.go b/weed/shell/command_volume_configure_replication.go
index ffc2656ea..5640e58bb 100644
--- a/weed/shell/command_volume_configure_replication.go
+++ b/weed/shell/command_volume_configure_replication.go
@@ -36,10 +36,6 @@ func (c *commandVolumeConfigureReplication) Help() string {
func (c *commandVolumeConfigureReplication) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
- if err = commandEnv.confirmIsLocked(); err != nil {
- return
- }
-
configureReplicationCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
volumeIdInt := configureReplicationCommand.Int("volumeId", 0, "the volume id")
replicationString := configureReplicationCommand.String("replication", "", "the intended replication value")
@@ -47,6 +43,10 @@ func (c *commandVolumeConfigureReplication) Do(args []string, commandEnv *Comman
return nil
}
+ if err = commandEnv.confirmIsLocked(); err != nil {
+ return
+ }
+
if *replicationString == "" {
return fmt.Errorf("empty replication value")
}