Repository navigation
Implement locking & co-ordination between cache cleans - #3644
Merged
Merged
Conversation
jwong-beep
reviewed
Oct 28, 2026
| } | ||
| cache.clean(policy, freeSpace) | ||
| now := time.Now() | ||
| if err := os.WriteFile(timestampFile, nil, 0644); err != nil { |
Contributor
There was a problem hiding this comment.
Should we write the timestamp into the file regardless? It's not using the timestamp in the name, it may be unintuitive to find out how to read the timestamp. Everyone knows how to use ls and cat, not everyone knows how to use stat.
Collaborator
Author
There was a problem hiding this comment.
Yeah that's not a bad idea, might as well while we're writing the file anyway.
peterebden
force-pushed
the
dir-cache-coordination
branch
from
October 31, 2026 10:24
06315c8 to
5fe0851
Compare
jwong-beep
approved these changes
Nov 2, 2026
This file contains hidden or 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
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.
Third and final part of #3629 , stacked on #3642
Implements a lockfile for the cache so if a clean is in progress, another process will see that and will not try to do it as well.
Also implements cleaning of stale lock files across the cache so they don't build up forever.