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

Re: [PATCH] Add support for parallel HTTP transfers

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 7, 2005, 17:41 UTC
Message-ID
<Pine.LNX.4.63.0510071323070.23242@iabervon.org>
In-Reply-To
<7v8xx55kia.fsf@assigned-by-dhcp.cox.net>
On Fri, 7 Oct 2005, Junio C Hamano wrote:
Show 18 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
> >> > It should be fine to download objects and a pack that contains them at the 
> >> > same time, although there's currently a check in fetch.c which should be 
> >> > removed, so that it will call fetch() for an object if the object appears 
> >> > between the prefetch() and the fetch().
> >> 
> >> Can you provide a patch, or point me toward the right place to make that
> >> change?
> >
> > It's line 168 of fetch.c; the "!has_sha1_file(obj->sha1)" part should go 
> > away.
> 
> The check was added in 029f6de377c7e0484f5c4cf070934599580f1784
> because back then calling fetch() on an object that we already
> had had a funny interaction with what http-fetch.c did.  I
> suspect that Nick's curl-multi changes made it unnecessary, but
> you should double check for other transports.

Hmm; my intended convention was that fetch() would always be called if prefetch() was called, even if something had happened to make it appear in between (e.g., prefetch() causing it to be fetched or a different call to fetch() speculatively also getting it).

The ssh transport actually wants to not have the check (if the object appears out of nowhere after we request it, we still want to read it out of the connection).

The local transport probably ought to have the check added on line 169 of local-fetch.c

In general, transports need to deal with this case themselves, because the core code doesn't know if they started something in prefetch() than needs to get finished in fetch().

	-Daniel
*This .sig left intentionally blank*
Previous: Jon LoeligerNext: Junio C Hamano
Message 13 of 14 in “Add support for parallel HTTP transfers”
  1. Add support for parallel HTTP transfersNick Hengeveld, Oct 5, 2005
  2. Daniel BarkalowOct 6, 2005
  3. Nick HengeveldOct 7, 2005
  4. Junio C HamanoOct 7, 2005
  5. Nick HengeveldOct 7, 2005
  6. Junio C HamanoOct 7, 2005
  7. Daniel BarkalowOct 7, 2005
  8. Junio C HamanoOct 7, 2005
  9. Nick HengeveldOct 7, 2005
  10. Junio C HamanoOct 7, 2005
  11. Daniel BarkalowOct 7, 2005
  12. Jon LoeligerOct 10, 2005
  13. Daniel BarkalowOct 7, 2005
  14. Junio C HamanoOct 7, 2005

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.