Skip to content

fix(git): freshen mirror in snapshot job, not per request#366

Merged
alecthomas merged 1 commit into
mainfrom
aat/git-fetch-on-snapshot-job
Jun 26, 2026
Merged

fix(git): freshen mirror in snapshot job, not per request#366
alecthomas merged 1 commit into
mainfrom
aat/git-fetch-on-snapshot-job

Conversation

@alecthomas

Copy link
Copy Markdown
Collaborator

Snapshot and git request paths called maybeBackgroundFetch on every
request, which is time-based and un-deduplicated. A parallel snapshot
restore burst made every concurrent request enqueue its own fetch,
flooding the per-repo fetch queue with back-to-back fetches.

Move mirror freshening into the periodic snapshot job (fetch then
snapshot) and drop maybeBackgroundFetch from the request paths.

Snapshot and git request paths called maybeBackgroundFetch on every
request, which is time-based and un-deduplicated. A parallel snapshot
restore burst made every concurrent request enqueue its own fetch,
flooding the per-repo fetch queue with back-to-back fetches.

Move mirror freshening into the periodic snapshot job (fetch then
snapshot) and drop maybeBackgroundFetch from the request paths.
@alecthomas alecthomas requested a review from a team as a code owner June 26, 2026 05:56
@alecthomas alecthomas requested review from joshfriend and removed request for a team June 26, 2026 05:56
@alecthomas alecthomas enabled auto-merge (squash) June 26, 2026 05:56
@alecthomas alecthomas merged commit 3e830a1 into main Jun 26, 2026
7 checks passed
@alecthomas alecthomas deleted the aat/git-fetch-on-snapshot-job branch June 26, 2026 05:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9066273871

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/strategy/git/snapshot.go
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.

1 participant