1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-17 08:00:28 +02:00

filer: reduce delete entry ErrNotFound logs (#5301)

This commit is contained in:
Sébastien 2024-02-14 23:22:08 +01:00 committed by GitHub
parent 8fb978d6f6
commit c694cb4e7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -213,14 +213,12 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
err := fs.filer.DeleteEntryMetaAndData(context.Background(), util.FullPath(objectPath), isRecursive, ignoreRecursiveError, !skipChunkDeletion, false, nil)
if err != nil {
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
httpStatus := http.StatusInternalServerError
if err == filer_pb.ErrNotFound {
httpStatus = http.StatusNoContent
writeJsonQuiet(w, r, httpStatus, nil)
writeJsonQuiet(w, r, http.StatusNoContent, nil)
return
}
writeJsonError(w, r, httpStatus, err)
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
writeJsonError(w, r, http.StatusInternalServerError, err)
return
}