mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 22:57:57 +08:00
filer: reduce delete entry ErrNotFound logs (#5301)
This commit is contained in:
@@ -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)
|
err := fs.filer.DeleteEntryMetaAndData(context.Background(), util.FullPath(objectPath), isRecursive, ignoreRecursiveError, !skipChunkDeletion, false, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
|
|
||||||
httpStatus := http.StatusInternalServerError
|
|
||||||
if err == filer_pb.ErrNotFound {
|
if err == filer_pb.ErrNotFound {
|
||||||
httpStatus = http.StatusNoContent
|
writeJsonQuiet(w, r, http.StatusNoContent, nil)
|
||||||
writeJsonQuiet(w, r, httpStatus, nil)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
writeJsonError(w, r, httpStatus, err)
|
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
|
||||||
|
writeJsonError(w, r, http.StatusInternalServerError, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user