Provide a way to remove the old commits
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 668
- Forks
- 135
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 7
Description
Central Dogma uses jGit to store data. Due to the nature of Git that stores unlimited history,
Central Dogma will eventually get in trouble managing disk usage.
We can handle this by removing old commits that are not used anymore. In order to do that, we cannot just
use Git squash because that changes the hash of the commits.
So what we are going to do is (that is suggested by @trustin):
- Creating a new Git repository whenever the commits of the previously created repository
reaches a certain number(`N`).
- So we are going to have `R`, `R + 1`, `R + 2`, `R + 3`, ...
- When we create the repository `R + 2`, we can remove the repository created two times earlier that is `R` in this case.
(We can also use a batch to remove that)
- We are going to store at most `2N` history.
- Limiting the number of history that a user can get to `N`
- That means that `Revision.INIT` is not `1` anymore. It will be `max(1, Revision.HEAD - N + 1)`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Central Dogma components that use jGit to store repositories and expose revision history. Determine where repository creation and Revision.INIT/HEAD behavior are implemented. Done means old repositories can be removed safely after rollover and users cannot request more than N revisions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100