mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 17:33:36 +08:00
[s3] revert skip deletion error, since the error file was not found is already skipped on the side of the grpc function (#5760)
* revert skip deletion error, since the error file was not found is already skipped on the side of the grpc function
* fix response error
* fix test_lifecycle_get
* Revert "fix test_lifecycle_get"
This reverts commit 8f991bdcf9
.
This commit is contained in:

committed by
GitHub

parent
182f6d00a9
commit
9c440d472c
@@ -30,12 +30,10 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
|
|||||||
target := util.FullPath(fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, bucket, object))
|
target := util.FullPath(fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, bucket, object))
|
||||||
dir, name := target.DirAndName()
|
dir, name := target.DirAndName()
|
||||||
|
|
||||||
s3a.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
|
err := s3a.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
|
||||||
|
|
||||||
err := doDeleteEntry(client, dir, name, true, false)
|
if err := doDeleteEntry(client, dir, name, true, false); err != nil {
|
||||||
if err != nil {
|
return err
|
||||||
// skip deletion error, usually the file is not found
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if s3a.option.AllowEmptyFolder {
|
if s3a.option.AllowEmptyFolder {
|
||||||
@@ -53,6 +51,10 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
w.WriteHeader(http.StatusNoContent)
|
w.WriteHeader(http.StatusNoContent)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user