-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(bloomstore): Cache metas LIST operation #12414
Conversation
69a7894
to
d7f002c
Compare
return cached.objects, cached.prefixes, nil | ||
} | ||
|
||
c.mtx.Lock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be moved after the c.ObjectClient.List
? Right now it's blocking any List of till the inner client finished.
IIUC we might want to do this so two lists doesn't happen at the same time but I think that's not ideal. Would make sense to block prevent two simultaneus calls for the same prefix tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I would like to avoid multiple concurrent LIST calls. You still need to sync the map access thereafter. So I think it makes sense to lock the whole operation.
Having separate locks for different prefixes makes eviction more complex. Not sure if that's worth it then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. We can re-evaluate if we see lock contention.
d7f002c
to
86af424
Compare
Signed-off-by: Christian Haudum <[email protected]>
Signed-off-by: Christian Haudum <[email protected]>
Signed-off-by: Christian Haudum <[email protected]>
Signed-off-by: Christian Haudum <[email protected]>
86af424
to
e9df2e3
Compare
Reduce the amount of class A list operations on object storage. Signed-off-by: Christian Haudum <[email protected]>
What this PR does / why we need it:
Reduce the amount of class A list operations on object storage.