Skip to content

Don't keep the index repository open long term #847

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

Merged
merged 2 commits into from
Jun 22, 2020

Conversation

Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Jun 22, 2020

After deploying #813 there was a big change in the number of used file descriptors. This is likely a result of libgit2/libgit2#2758 given that #813 changed behaviour to keep the index repository open instead of just opening it when needed.

Given how long that libgit2 issue and the PR fixing it have been open, it seems unlikely to be fixed soon. It would probably be ok to have all the packfiles open all the time, except based on this comment when running a concurrent git gc the garbage collected packfiles will not be closed, so there will be a constant slow fd leak until the service is restarted (which you can see in the graph below).

image

This PR changes behaviour back to match the old setup, only opening the repository when needed, and sticks some more context on related errors just in case.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo nit.

@jyn514 jyn514 merged commit 09b55bc into rust-lang:master Jun 22, 2020
@Nemo157 Nemo157 deleted the dont-retain-git-repo branch June 22, 2020 22:24
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