Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

gitserver: Reduce number of git config invocations#62615

Merged
eseliger merged 1 commit into
mainfrom
es/05-13-gitserverreducenumberofgitconfiginvocations
May 13, 2024
Merged

gitserver: Reduce number of git config invocations#62615
eseliger merged 1 commit into
mainfrom
es/05-13-gitserverreducenumberofgitconfiginvocations

Conversation

@eseliger

Copy link
Copy Markdown
Member

Using config is fairly convenient, but got somewhat out of hand. On dotcom, we call this millions of times, because the janitor runs frequently and there are a lot of repos.
Instead, for a few simple things we now use a different mechanism that has less overhead (also, we only abused the git config, those values are of no interest to git itself).

  1. The timestamp for the last size calculation is now stored as the mtime of a magic file in the repo dir.
  2. The repoType is only loaded when there is a reclone reason, and we might want to skip over Perforce repos

Test plan:

Added a basic test, and integration tests still pass.

@github-actions github-actions Bot added team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all labels May 13, 2024
@eseliger eseliger force-pushed the es/05-13-gitservermoveremovalofstraytmppackfilestojanitor branch from bf8ed84 to 88e9cca Compare May 13, 2024 03:13
@eseliger eseliger force-pushed the es/05-13-gitserverreducenumberofgitconfiginvocations branch 2 times, most recently from 1fe128f to 79cba1f Compare May 13, 2024 03:29
@eseliger eseliger marked this pull request as ready for review May 13, 2024 03:38
@eseliger eseliger requested a review from a team May 13, 2024 03:38
@eseliger eseliger force-pushed the es/05-13-gitservermoveremovalofstraytmppackfilestojanitor branch from 88e9cca to dbc60f7 Compare May 13, 2024 13:15
@eseliger eseliger force-pushed the es/05-13-gitserverreducenumberofgitconfiginvocations branch from 79cba1f to 804d532 Compare May 13, 2024 13:15
@eseliger eseliger force-pushed the es/05-13-gitservermoveremovalofstraytmppackfilestojanitor branch from dbc60f7 to ce5274c Compare May 13, 2024 14:35
Base automatically changed from es/05-13-gitservermoveremovalofstraytmppackfilestojanitor to main May 13, 2024 14:44
Using config is fairly convenient, but got somewhat out of hand. On dotcom, we call this millions of times, because the janitor runs frequently and there are a lot of repos.
Instead, for a few simple things we now use a different mechanism that has less overhead (also, we only abused the git config, those values are of no interest to git itself).
1. The timestamp for the last size calculation is now stored as the mtime of a magic file in the repo dir.
2. The repoType is only loaded when there is a reclone reason, and we might want to skip over Perforce repos

Test plan:

Added a basic test, and integration tests still pass.
@eseliger eseliger force-pushed the es/05-13-gitserverreducenumberofgitconfiginvocations branch from 804d532 to 0b9d527 Compare May 13, 2024 14:45

eseliger commented May 13, 2024

Copy link
Copy Markdown
Member Author

Merge activity

  • May 13, 10:46 AM EDT: Graphite rebased this pull request after merging its parent, because this pull request is set to merge when ready.
  • May 13, 10:54 AM EDT: @eseliger merged this pull request with Graphite.

@eseliger eseliger merged commit 28fe8e1 into main May 13, 2024
@eseliger eseliger deleted the es/05-13-gitserverreducenumberofgitconfiginvocations branch May 13, 2024 14:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants