git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: RFC: Would a config fetch.retryCount make sense?

From
Ben Peart <peartben@gmail.com>
Date
Jun 5, 2017, 14:08 UTC
Message-ID
<0bd7b8cd-534a-10ca-78b9-8e041c4c98ec@gmail.com>
In-Reply-To
<9840A095-49EA-4B0C-B318-F86EEF9261B1@gmail.com>
On 6/5/2017 8:04 AM, Lars Schneider wrote:
Show 25 quoted lines
> 
>> On 01 Jun 2017, at 15:33, Ben Peart <peartben@gmail.com> wrote:
>>
>>
>>
>> On 6/1/2017 8:48 AM, Lars Schneider 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.
>>> In some places we added a basic retry mechanism and I was wondering
>>> if this could be a useful feature for Git itself.
>>
>> Having a configurable retry mechanism makes sense especially if it allows continuing an in-progress download rather than aborting and trying over.  I would make it off by default so that any existing higher level retry mechanism doesn't trigger a retry storm if the problem isn't a transient network glitch.
> 
> Agreed.
> 
> 
>> Internally we use a tool (https://github.com/Microsoft/GVFS/tree/master/GVFS/FastFetch) to perform fetch for our build machines.  It has several advantages including retries when downloading pack files.
> 
> That's a "drop-in" replacement for "git fetch"?! I looked a bit through the
> "git fetch" code and retry (especially with continuing in-progress downloads)
> looks like a bigger change than I expected because of the current "die()
> in case of error" implementation.
> 

No, not a drop in replacement. We only use this on build machines which don't need history so it only pulls down the tip commit on the initial clone. This is a big win on large repos with a lot of history but not so great for a developer machines where history may be desired.

Show 5 quoted lines
> 
>> It's biggest advantage is that it uses multiple threads to parallelize the entire fetch and checkout operation from end to end (ie the download happens in parallel as well as checkout happening in parallel with the download) which makes it take a fraction of the overall time.
> 
> Interesting. Do you observe noticeable speed improvements with fetch delta updates,
> too? This is usually fast enough for us.

Since we have our build machines setup to use it for the clone, we kept using it for delta updates. When deltas get large (and with thousands of developers pushing that can happen pretty quickly) it is still a nice perf win.

Show 14 quoted lines
> 
> The people I work with usually complain that the "clone operation" is slow. The
> reason is that they clone over and over again to get a "clean checkout". I try
> to explain to them in that case that every machine should clone only once and
> that there are way more efficient ways to get a clean checkout.
> 
> 
>> When time permits, I hope to bring some of these enhancements over into git itself.
> 
> That would be great!
> 
> 
> - Lars
> 
Previous: Lars SchneiderNext: Stefan Beller
Message 4 of 5 in “RFC: Would a config fetch.retryCount make sense?”
  1. Lars SchneiderJun 1, 2017
  2. Ben PeartJun 1, 2017
  3. Lars SchneiderJun 5, 2017
  4. Ben PeartJun 5, 2017
  5. Stefan BellerJun 1, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.