mirror of
https://github.com/nspcc-dev/neofs-s3-gw.git
synced 2026-03-01 04:29:15 +00:00
Is object cache updated correctly during object removal? #178
Labels
No labels
I2
I2
I3
I4
S2
S3
S4
S4
U0
U1
U2
U2
U3
U4
U4
auth-mate
blocked
bug
config
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
question
security
test
tree-service
tree-service
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-s3-gw#178
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @cthulhu-rider on GitHub (Mar 1, 2022).
Originally assigned to: @KirillovDenis on GitHub.
Here we update local object cache on object removal
nspcc-dev/neofs-s3-gw@4454821285/api/layer/object.go (L413)As we can see cache is updated regardless of call outcome. Is it correct? I haven't explored the behavior deeply, just happened to notice.
@alexvanin commented on GitHub (Mar 9, 2022):
As we discussed it with @realloc @KirillovDenis @masterSplinter01 last Thursday, it is correct. It is better to remove existing value from cache than keep removed value there.
However I see some inconsistency in code, where cache value is removed based on success of NeoFS operation.
nspcc-dev/neofs-s3-gw@e7b742df4d/api/layer/system_object.go (L54-L60)nspcc-dev/neofs-s3-gw@e7b742df4d/api/layer/layer.go (L893-L896)