Skip to content
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

Garbage collector for old glide_XXXX dirs #369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rynge
Copy link
Member

@rynge rynge commented Jan 28, 2025

No description provided.

}

// Filter dirs
for _, dir := range dirs {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you switch this to be based on WalkFunc?

I like WalkFunc better because it doesn't require us to completely iterate through the directory -- significantly reduces the load on the filesystem and reduces what's buffered in memory.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want a random pick, I think we have to build the complete list of candidates first (which means full listing, and stating).

One option would be to relax that requirement, use WalkFunc, and select the candidates one by one. However, I suspect this mean the removal happens in lexical order and that could be problematic if we have multiple active glideins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants