aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server_handlers_read.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/volume_server_handlers_read.go')
-rw-r--r--weed/server/volume_server_handlers_read.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go
index 2e32bae5f..839e17fbe 100644
--- a/weed/server/volume_server_handlers_read.go
+++ b/weed/server/volume_server_handlers_read.go
@@ -42,8 +42,8 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
glog.V(4).Infoln("volume", volumeId, "reading", n)
hasVolume := vs.store.HasVolume(volumeId)
- _, hasEcShard := vs.store.HasEcShard(volumeId)
- if !hasVolume && !hasEcShard {
+ _, hasEcVolume := vs.store.FindEcVolume(volumeId)
+ if !hasVolume && !hasEcVolume {
if !vs.ReadRedirect {
glog.V(2).Infoln("volume is not local:", err, r.URL.Path)
w.WriteHeader(http.StatusNotFound)
@@ -71,7 +71,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
var count int
if hasVolume {
count, err = vs.store.ReadVolumeNeedle(volumeId, n)
- } else if hasEcShard {
+ } else if hasEcVolume {
count, err = vs.store.ReadEcShardNeedle(context.Background(), volumeId, n)
}
glog.V(4).Infoln("read bytes", count, "error", err)