filer: retryable when error is not found

This commit is contained in:
chrislu
2022-08-19 03:36:15 -07:00
parent 58dd880322
commit aac45f3e89
2 changed files with 6 additions and 2 deletions

View File

@@ -143,7 +143,11 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
// glog.V(4).Infoln("read bytes", count, "error", err)
if err != nil || count < 0 {
glog.V(3).Infof("read %s isNormalVolume %v error: %v", r.URL.Path, hasVolume, err)
w.WriteHeader(http.StatusNotFound)
if err == storage.ErrorNotFound || err == storage.ErrorDeleted {
w.WriteHeader(http.StatusNotFound)
} else {
w.WriteHeader(http.StatusInternalServerError)
}
return
}
if n.Cookie != cookie {