fix data writes error when consecutive calls overlaps with previous writes

This commit is contained in:
Chris Lu
2018-09-07 13:11:43 -07:00
parent 43ff60cb23
commit 75e749039b
3 changed files with 27 additions and 8 deletions

View File

@@ -68,7 +68,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
count, e := vs.store.ReadVolumeNeedle(volumeId, n)
glog.V(4).Infoln("read bytes", count, "error", e)
if e != nil || count < 0 {
glog.V(0).Infoln("read error:", e, r.URL.Path)
glog.V(0).Infof("read %s error:", r.URL.Path, e)
w.WriteHeader(http.StatusNotFound)
return
}