Process 'object not found' error when object is missing in object service #120
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#120
Loading…
Reference in a new issue
No description provided.
Delete branch "alexvanin/frostfs-s3-gw:fix/obj-not-found"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #78
d09d29a259
to1a00b843b5
WIP: Process 'object not found' error when object is missing in object serviceto Process 'object not found' error when object is missing in object service@ -647,2 +647,4 @@
}
if client.IsErrObjectNotFound(obj.Error) {
n.log.Debug("object not found removed", zap.String("bucket", bkt.Name), zap.Stringer("cid", bkt.CID),
Probably it's better omit
removed
word from log message@ -649,0 +650,4 @@
n.log.Debug("object not found removed", zap.String("bucket", bkt.Name), zap.Stringer("cid", bkt.CID),
zap.String("object", obj.Name), zap.String("oid", obj.VersionID))
obj.Error = nil
Don't we want to return
object not found
to user to tell him that something went wrong?Isn't the main idea of the issue is to return no error when trying delete unavailable object?
@ -649,0 +652,4 @@
obj.Error = nil
n.cache.DeleteObjectName(bkt.CID, bkt.Name, obj.Name)
Can move this out of
if
block to reuse with previousif
?Not sure, because we don't to delete cache on other errors besides not found / already removed?
I mean instead of:
write:
though it's a matter of taste
Consider parsing "access denied" error.
First snippet does not clear the cache, second snippet does. I am not sure we want to clear cache for any error beside "not found" and "already removed".
Let's add the following test to this file:
1a00b843b5
to6aa6679653
6aa6679653
to868edfdb31