Skip to content

LibGit2 repo startup time affects read-object hook and hydration #1277

Closed
@derrickstolee

Description

@derrickstolee

The LibGit2Repo pool used to create a bunch of libgit2 repos and leave them open for the entire mount process. This needed to change for the packfile maintenance step to successfully delete packfiles. However, the way we dispose of the libgit2 repos on a timer affects performance in a bad way: it can take on the order of seconds to recreate one.

Instead of disposing on a timer, instead we should dispose when the packfile maintenance starts and recreate the repo after it is done. If a request comes in during the maintenance, then we should honor it and create a repo. This may cause a stale .idx file, but we log those and clean them up the next time. Further, this isolates the slow startup to at most once a day.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions