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

op_store: implement GC of unreachble operations and views #2790

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Jan 8, 2024

#12

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

yuja added 3 commits January 8, 2024 15:43
It doesn't make sense to do gc from a non-head operation because that means
either the head operation would be corrupted or the --at-op argument is
ignored.
Since new operations and views may be added concurrently by another process,
there's a risk of data corruption. The keep_newer parameter is a mitigation
for this problem. It's set to preserve files modified within the last 2 weeks,
which is the default of "git gc". Still, a concurrent process may replace an
existing view which is about to be deleted by the gc process, and the view
file would be lost.

jj-vcs#12
lib/src/simple_op_store.rs Show resolved Hide resolved
@yuja yuja merged commit e9d3117 into jj-vcs:main Jan 9, 2024
15 checks passed
@yuja yuja deleted the push-pnozvyvnxkks branch January 9, 2024 01:37
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