From 06c43286cd8f2a81488f022958bdba2246f69bad Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 28 Sep 2018 00:10:49 -0700 Subject: [PATCH] skip error when deletion failed --- weed/operation/delete_content.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/operation/delete_content.go b/weed/operation/delete_content.go index 41f98e4d4..d2a0c4070 100644 --- a/weed/operation/delete_content.go +++ b/weed/operation/delete_content.go @@ -12,6 +12,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/security" "github.com/chrislusf/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" ) type DeleteResult struct { @@ -32,7 +33,8 @@ func DeleteFromVolumeServer(fileUrlOnVolume string, jwt security.EncodedJwt) err func DeleteFile(master string, fileId string, jwt security.EncodedJwt) error { fileUrl, err := LookupFileId(master, fileId) if err != nil { - return fmt.Errorf("Failed to lookup %s:%v", fileId, err) + glog.V(0).Infof("Delete %s lookup: %v, master: %s", fileId, err, master) + return nil } err = util.Delete(fileUrl, jwt) if err != nil {