Skip to content

Provide a way to remove the old commits #575

@minwoox

Description

@minwoox

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions