aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location_ec.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-08-26 09:16:58 -0700
committerChris Lu <chris.lu@gmail.com>2020-08-26 09:16:58 -0700
commitab759f0ec2185a256b9164e72132790b7bc7696b (patch)
tree6193f96cbd034aa3c68e980305296c396d3133f3 /weed/storage/disk_location_ec.go
parentd1cf39f1800f56df86bda90de0331175896a8998 (diff)
downloadseaweedfs-ab759f0ec2185a256b9164e72132790b7bc7696b.tar.xz
seaweedfs-ab759f0ec2185a256b9164e72132790b7bc7696b.zip
erasure coding: fix EC error if multiple disks are configured in one volume server
Diffstat (limited to 'weed/storage/disk_location_ec.go')
-rw-r--r--weed/storage/disk_location_ec.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go
index 72d3e2b3e..07fab96d9 100644
--- a/weed/storage/disk_location_ec.go
+++ b/weed/storage/disk_location_ec.go
@@ -3,6 +3,7 @@ package storage
import (
"fmt"
"io/ioutil"
+ "os"
"path"
"regexp"
"sort"
@@ -58,6 +59,9 @@ func (l *DiskLocation) LoadEcShard(collection string, vid needle.VolumeId, shard
ecVolumeShard, err := erasure_coding.NewEcVolumeShard(l.Directory, collection, vid, shardId)
if err != nil {
+ if err == os.ErrNotExist {
+ return os.ErrNotExist
+ }
return fmt.Errorf("failed to create ec shard %d.%d: %v", vid, shardId, err)
}
l.ecVolumesLock.Lock()