From 73564e6a01770316f5ab57e7f4ba8227cedbf1dd Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 23 Apr 2020 13:37:31 -0700 Subject: master: add cluster wide lock/unlock operation in weed shell fix https://github.com/chrislusf/seaweedfs/issues/1286 --- weed/shell/command_ec_encode.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'weed/shell/command_ec_encode.go') diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go index 6efb05488..8f11f8480 100644 --- a/weed/shell/command_ec_encode.go +++ b/weed/shell/command_ec_encode.go @@ -54,6 +54,10 @@ func (c *commandEcEncode) Help() string { func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + encodeCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) volumeId := encodeCommand.Int("volumeId", 0, "the volume id") collection := encodeCommand.String("collection", "", "the collection name") -- cgit v1.2.3