Skip to content

fix(fetch): run at most 8 upstream fetches at once - #532

Draft
roschaefer wants to merge 1 commit into
mainfrom
fix/180-fetch-concurrency
Draft

roschaefer wants to merge 1 commit into
mainfrom
fix/180-fetch-concurrency

Conversation

@roschaefer

Copy link
Copy Markdown
Owner

fetch started one git fetch per distinct upstream URL, all at the same
moment. With many splices on one self-hosted server behind OpenSSH, the
default MaxStartups 10:30:100 makes sshd drop unauthenticated
connections at random once more than 10 are open, so some fetches
failed at random and pull skipped those splices. 8 stays under that
threshold while keeping fetches parallel. It is fixed rather than
configurable: Git's own fetch.parallel defaults to 1, so reusing that
name would either make every fetch sequential or give it a meaning that
differs from Git's.

A fetch thread that panicked also left its splices reported as fetched,
with nothing printed; they now count as failed, like a failed fetch.

Fixes #180

fetch started one git fetch per distinct upstream URL, all at the same
moment. With many splices on one self-hosted server behind OpenSSH, the
default MaxStartups 10:30:100 makes sshd drop unauthenticated
connections at random once more than 10 are open, so some fetches
failed at random and pull skipped those splices. 8 stays under that
threshold while keeping fetches parallel. It is fixed rather than
configurable: Git's own fetch.parallel defaults to 1, so reusing that
name would either make every fetch sequential or give it a meaning that
differs from Git's.

A fetch thread that panicked also left its splices reported as fetched,
with nothing printed; they now count as failed, like a failed fetch.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1ff36cb7-4681-4a84-938c-541ae8988213
Commits

Reviewing files that changed from the base of the PR and between cb3f483 and 1f304c5.

Files selected for processing: 4

  • docs/06-command-reference/02-fetch.md
  • docs/tests/fetch.bats
  • src/fetch.rs
  • src/usage/fetch.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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.

fetch opens a connection per upstream at once, and an SSH server's MaxStartups drops some

1 participant