-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: use lease to manage local cache for gc #157
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imeoer
reviewed
Jul 6, 2023
imeoer
reviewed
Jul 14, 2023
Desiki-high
force-pushed
the
feat-lm
branch
4 times, most recently
from
July 14, 2023 05:15
ef32374
to
031b2a5
Compare
Desiki-high
force-pushed
the
feat-lm
branch
4 times, most recently
from
August 7, 2023 05:41
e1d5bbc
to
c36c25b
Compare
imeoer
reviewed
Aug 8, 2023
Also add usedAtLabel and usedCountLabel in lease bucket, usedAtLabel is the latest used time of each blob, usedCountLabel helps to count the used times of each blob. Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
Desiki-high
force-pushed
the
feat-lm
branch
2 times, most recently
from
August 9, 2023 07:40
5c3d3d2
to
9439819
Compare
imeoer
reviewed
Aug 10, 2023
We can use leaseManager to keep the content blob cache. LeaseManager will create lease of eache content blob and update the latest used time and used counts of each blob in lease bucket. We call updateLease in content store ReadAt and cleanLease in GC. Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
imeoer
approved these changes
Aug 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now acceld's
GarbageCollect
will clear all caches when content size is over the threshold. We should use the lease to choose which content blob should be reserved. TheupdatedAt
can help us to choose blobs.Changes:
updatedAt
tousedat
and move to lease bucket (labels).usedCountLabel
in lease bucket.usedat
(LRU).TODO:
We should update the order of GC from
LRU
toLRFU
byusedCountLabel
.Reference: #141.