mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip error when deletion failed
This commit is contained in:
parent
746017ea4f
commit
06c43286cd
|
@ -12,6 +12,7 @@ import (
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/security"
|
"github.com/chrislusf/seaweedfs/weed/security"
|
||||||
"github.com/chrislusf/seaweedfs/weed/util"
|
"github.com/chrislusf/seaweedfs/weed/util"
|
||||||
|
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DeleteResult struct {
|
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 {
|
func DeleteFile(master string, fileId string, jwt security.EncodedJwt) error {
|
||||||
fileUrl, err := LookupFileId(master, fileId)
|
fileUrl, err := LookupFileId(master, fileId)
|
||||||
if err != nil {
|
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)
|
err = util.Delete(fileUrl, jwt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue