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 collection reachability improvements #418

Merged
merged 3 commits into from
Jun 27, 2022
Merged

Garbage collection reachability improvements #418

merged 3 commits into from
Jun 27, 2022

Conversation

arxanas
Copy link
Owner

@arxanas arxanas commented Jun 15, 2022

Closes #412. With this stack, any commit which appears in git smartlog should be marked as reachable for GC, regardless of where it came from.

@arxanas arxanas changed the title GC improvements Garbage collection reachability improvements Jun 15, 2022
arxanas added 2 commits June 26, 2022 16:47
Detected by IntelliJ but not by `cargo clippy`.
The fact that this function returns an unsorted `Vec` is relevant to call out, since in many cases, we will want to sort the `Vec` for determinism (e.g. before outputting elements of the `Vec` in a test).
@arxanas arxanas marked this pull request as ready for review June 27, 2022 04:35
@arxanas arxanas merged commit 24beb1b into master Jun 27, 2022
@arxanas arxanas deleted the arxanas/gc branch June 27, 2022 04:35
arxanas added a commit that referenced this pull request Jun 28, 2022
Unfortunately, adding garbage collection references for every invisible head is a significant performant regression. To fix this, we instead only mark commits as reachable if they're *active* (would appear in the smartlog). This does mean that commits which were available in the DAG but not used by the smartlog might get garbage collected, but it seems like an acceptable trade-off.
arxanas added a commit that referenced this pull request Jun 28, 2022
Unfortunately, adding garbage collection references for every invisible head is a significant performant regression. To fix this, we instead only mark commits as reachable if they're *active* (would appear in the smartlog). This does mean that commits which were available in the DAG but not used by the smartlog might get garbage collected, but it seems like an acceptable trade-off.
arxanas added a commit that referenced this pull request Jun 28, 2022
Unfortunately, adding garbage collection references for every invisible head is a significant performant regression. To fix this, we instead only mark commits as reachable if they're *active* (would appear in the smartlog). This does mean that commits which were available in the DAG but not used by the smartlog might get garbage collected, but it seems like an acceptable trade-off.
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.

Unhidden commits shouldn't be garbage collected
1 participant