-
Notifications
You must be signed in to change notification settings - Fork 160
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
Only garbage collect action cache entries #65
Comments
Can we make an assumption that one CAS entry is only referenced by one ac entry, so that when we delete ac entry, we just delete all the CAS entries referenced by that ac entry? |
No that's generally not true. A blob is often referenced by thousands of action cache entries. I am currently implementing this feature and adding a reference count to each CAS entry. So we'll only evict a CAS entry when its no longer referenced. |
Then when PUT AC/CAS to server, Is the following sequence always guaranteed to ensure the server correctness:
|
Also, is it possible to let Bazel back off when it GET an AC entry returns 200 but the corresponding CAS is not found in the server? I found when this happens, bazel build may fail. The Bazel build requirement that CAS entry referred by AC entry always exist in the server causes two drawbacks:
|
The cache should only garbage collect action cache entries based on last access time. CAS entries should have a reference count and only be collected if they are no longer referenced by any cache entry.
The text was updated successfully, but these errors were encountered: