Clean up already removed object from tree #97
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#97
Loading…
Reference in a new issue
No description provided.
Delete branch "ironbee/frostfs-s3-gw:cleanup-tree-when-object-deleted-via-grpc"
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?
Signed-off-by: Artem Tataurov a.tataurov@yadro.com
Closes: #78
5d12d7a0d9
to5d063ddaec
WIP: Clean up already removed object from treeto Clean up already removed object from tree5d063ddaec
toe28d5eff73
e28d5eff73
tof99f1f73b9
@ -5,6 +5,7 @@ import (
"crypto/ecdsa"
"crypto/rand"
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/api/cache"
Please group imports
@ -633,2 +635,4 @@
}
func (n *layer) handleObjectAlreadyRemovedError(ctx context.Context, bkt *data.BucketInfo, obj *VersionedObject, nodeID uint64) *VersionedObject {
if !client.IsErrObjectAlreadyRemoved(obj.Error) {
It seems we also should handle
not found
error and put empty list into cache only in such casef99f1f73b9
tof75cdf4fcb
f75cdf4fcb
to3b5dda3725
3b5dda3725
toc4000c48c6
c4000c48c6
to6d67ac9b30
@ -635,0 +647,4 @@
owner := n.Owner(ctx)
cacheKey := cache.CreateObjectsListCacheKey(bkt.CID, "", false)
n.cache.DeleteObjectName(bkt.CID, bkt.Name, obj.Name)
n.cache.PutList(owner, cacheKey, []*data.NodeVersion{})
We should omit this.
Let's write:
instead of
6d67ac9b30
to8b93f2d515
LGTM
8b93f2d515
toa0f0d792b8