Skip to content

Run periodic maintenance on the git-backed fetch cache #11444

Open
@roberth

Description

Is your feature request related to a problem? Please describe.

We're accessing the git cache through libgit2, whose functions perform specific tasks only.
The Git CLI on the other hand performs certain maintenance tasks, notably git gc on occassion (and/or in the background?)

Describe the solution you'd like

  • Build multi-pack index files (relevant since libgit2, GitRepo: Write (thin) packfiles #11330)
  • Re-pack the repo? A large number of tiny packfiles might perform worse; not sure. Does git gc do that?
  • Garbage collect (we could use refs to track the last use of trees that are accessed as the root of a source)

These processes could run in a background process while holding a lock (file based lock).

Describe alternatives you've considered

Amortize the work - just do it in the foreground every now and then.

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalfetchingNetworking with the outside (non-Nix) world, input locking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions