diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-19 03:36:15 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-19 03:36:15 -0700 |
| commit | aac45f3e89a2c1704e9f2d19c957d950e7268e2b (patch) | |
| tree | c6f17636e7f3c595632a7f4e5b03a3f0ecf3b704 /weed/server/volume_server_handlers_read.go | |
| parent | 58dd8803224dd5340c54cecf843363fa2570905f (diff) | |
| download | seaweedfs-aac45f3e89a2c1704e9f2d19c957d950e7268e2b.tar.xz seaweedfs-aac45f3e89a2c1704e9f2d19c957d950e7268e2b.zip | |
filer: retryable when error is not found
Diffstat (limited to 'weed/server/volume_server_handlers_read.go')
| -rw-r--r-- | weed/server/volume_server_handlers_read.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index 4208dd4fc..4a20bba38 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -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 { |
