Improve object listing speed #165
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#165
Loading…
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?
Object listing produces
HEAD
requests for every object gateway finds in the tree service. This makes listing operation kinda slow but allows to exclude some objects from listing, e.g. expired or manually removed objects.Consider some ways to improve searching speed:
As I remember we wanted stream nodes from tree to be able paginate list results. But we need ordered GetSubTree first TrueCloudLab/frostfs-node#335
#294 implements solution that consists of two optimizations:
object.HEAD
requests on every object in bucket.While first optimization provides speed improvement, there are still many
object.HEAD
requests in large buckets with significant overhead. These requests had a purpose in the case when object service and tree service are unsynced: object may be unavailable while tree node is present.During object removal, gateway sends object service request first and then removes tree node. Previously we've decided that it is dangerous to ignore object service failures during object removal. So node remains in the tree and gateway removes object from listing output after failed
object.HEAD
request (#78). This way bucket can be cleaned and removed regardless of object service failures and we avoid unnecessary tree node removal.In order to apply second optimization, we should dismiss earlier assumptions. As we discussed, this optimization leads to much better user experience and is more valuable than highly conservative approach of keeping meta-data (tree node) during object removal in case of object service failures.
After this fix:
/cc @realloc @a.bogatyrev @fyrchik
Only for
object already removed
andobject not found
failuresIn frostfs-cli there is a special case for LOCK objects: if this "supposedly missing" object turns out to be of LOCK type, will this be S3 protocol violation? I mean deleting such bucket.
Probably yes (if this lock was created by s3)
GetObjectAttributes
#304