git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: RFC: Would a config fetch.retryCount make sense?
Date: Thu, 1 Jun 2017 10:59:40 -0700
Message-ID: <CAGZ79kZiPgsFaj23QvtgEgUhMiA5ygowY4OorSnzEfCdbv=a7g@mail.gmail.com> (raw)
In-Reply-To: <6762A30E-C558-4085-943B-AB85EBF18706@gmail.com>

On Thu, Jun 1, 2017 at 5:48 AM, Lars Schneider <larsxschneider@gmail.com> wrote:
> Hi,
>
> we occasionally see "The remote end hung up unexpectedly" (pkt-line.c:265)
> on our `git fetch` calls (most noticeably in our automations). I expect
> random network glitches to be the cause.

There is 665b35eccd (submodule--helper: initial clone learns retry
logic, 2016-06-09)
but that is for submodules and only the initial clone.

I tried searching the mailing list archive if it was discussed for
fetch before (I am sure it was), but could not find a good hint to link at.

IIRC one major concern was:
* When a human operates git-fetch, then they want to have fast feedback.
  The failure may be non-transient, for example when I forgot to up the
  wifi connection. Then the human can inspect and fix the root cause.
  (Assumption in human workflow: these non transient errors happen more
  often than the occasional fetch error due to network glitches.)

For automation I would expect that the retry logic is actually beneficial,
such that you would want to have a command line options such as
"git fetch --retries=5 --delay-between-retries=10s".

>
> In some places we added a basic retry mechanism and I was wondering
> if this could be a useful feature for Git itself.

There are already retries in other places. :) Cf. f4ab4f3ab1
(lock_packed_refs():
allow retries when acquiring the packed-refs lock, 2015-05-11), which
solves the need
of github on the serverside, when they have a very active repo that
multiple people
push to at the same time. (to different branches. I believe that forks
are internally
handled as the same repo, just with different namespaces. So if there
are 1000 forks
of linux.git you see a lot of pushes to the "same" repo)

>
> E.g. a Git config such as "fetch.retryCount" or something.
> Or is there something like this in Git already and I missed it?

I like it.

Thanks,
Stefan

      parent reply index

Thread overview: 5+ messages in thread (expand / mbox.gz / Atom feed / [top])
2017-06-01 12:48 Lars Schneider
2017-06-01 13:33 ` Ben Peart
2017-06-05 12:04   ` Lars Schneider
2017-06-05 14:08     ` Ben Peart
2017-06-01 17:59 ` Stefan Beller [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply to all the recipients using the --to, --cc,
  and --in-reply-to switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGZ79kZiPgsFaj23QvtgEgUhMiA5ygowY4OorSnzEfCdbv=a7g@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=larsxschneider@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox