aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_encode.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-07-28 03:58:13 -0700
committerChris Lu <chris.lu@gmail.com>2019-07-28 03:58:13 -0700
commit8afd8d35b3230f6fc286967e8aa9641bd8c1460c (patch)
tree8c134e958969a7aec6337c8c7bab120009006941 /weed/shell/command_ec_encode.go
parent2c6cf72e73861f3bdefaba28189fa2b15fa26d9e (diff)
downloadseaweedfs-8afd8d35b3230f6fc286967e8aa9641bd8c1460c.tar.xz
seaweedfs-8afd8d35b3230f6fc286967e8aa9641bd8c1460c.zip
master: followers can also lookup and redirect
improve scalability
Diffstat (limited to 'weed/shell/command_ec_encode.go')
-rw-r--r--weed/shell/command_ec_encode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go
index 8ad0d51c8..f07cb93f9 100644
--- a/weed/shell/command_ec_encode.go
+++ b/weed/shell/command_ec_encode.go
@@ -87,8 +87,8 @@ func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Wr
func doEcEncode(ctx context.Context, commandEnv *CommandEnv, collection string, vid needle.VolumeId) (err error) {
// find volume location
- locations := commandEnv.MasterClient.GetLocations(uint32(vid))
- if len(locations) == 0 {
+ locations, found := commandEnv.MasterClient.GetLocations(uint32(vid))
+ if !found {
return fmt.Errorf("volume %d not found", vid)
}