aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-05-28 00:51:01 -0700
committerChris Lu <chris.lu@gmail.com>2019-05-28 00:51:01 -0700
commit4f76342cbc8e6a2b48a3bfe6478170ec8f487f8b (patch)
tree1d002a9391b7143908b109968942db9752aae243 /weed/storage/erasure_coding
parent2858a954b32190969c144359b4e2717f07012af9 (diff)
downloadseaweedfs-4f76342cbc8e6a2b48a3bfe6478170ec8f487f8b.tar.xz
seaweedfs-4f76342cbc8e6a2b48a3bfe6478170ec8f487f8b.zip
WIP
no errors, but not returning file content * the interval needs to use actual file zie * need to read the actual version instead of the current version
Diffstat (limited to 'weed/storage/erasure_coding')
-rw-r--r--weed/storage/erasure_coding/ec_volume.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/storage/erasure_coding/ec_volume.go b/weed/storage/erasure_coding/ec_volume.go
index ecdc372bb..28f26d683 100644
--- a/weed/storage/erasure_coding/ec_volume.go
+++ b/weed/storage/erasure_coding/ec_volume.go
@@ -41,6 +41,8 @@ func NewEcVolume(dir string, collection string, vid needle.VolumeId) (ev *EcVolu
}
ev.ecxFileSize = ecxFi.Size()
+ ev.ShardLocations = make(map[ShardId][]string)
+
return
}
@@ -51,7 +53,7 @@ func (ev *EcVolume) AddEcVolumeShard(ecVolumeShard *EcVolumeShard) bool {
}
}
ev.Shards = append(ev.Shards, ecVolumeShard)
- sort.Slice(ev, func(i, j int) bool {
+ sort.Slice(ev.Shards, func(i, j int) bool {
return ev.Shards[i].VolumeId < ev.Shards[j].VolumeId ||
ev.Shards[i].VolumeId == ev.Shards[j].VolumeId && ev.Shards[i].ShardId < ev.Shards[j].ShardId
})