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

Re: Slow fetches of tags

From
Junio C Hamano <junkio@cox.net>
Date
May 25, 2006, 01:32 UTC
Message-ID
<7vd5e23n5a.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0605241641250.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 12 quoted lines
> On Wed, 24 May 2006, Linus Torvalds wrote:
>> 
>> IOW, I think there's something more fundamentally wrong with the tag 
>> following. We _should_ have figured out much more quickly that we have it 
>> all.
>
> Actually, maybe the problem is that Ralf's tree has two roots, because of 
> the old CVS history. It might be following the other root down for the 
> "have" part, since that one doesn't exist at all in the target and the 
> other side will never acknowledge any of it. 
>
> I'll play with it.

I think I know what is going on. You are exactly right -- the two-root ness is what is causing this.

We used to stop sending "have" immediately after we get an ACK. This was troublesome for trees with many long branches, so we introduced multi_ack protocol extension to let the server side (upload-pack) say "Ok, enough on this branch -- I know this object so do not tell me any more about objects reachable from it, but do tell me about other development tracks if you have one". If you run "fetch-pack -v" after priming a repository with Ralf's tree and Chris's tree, you will see many "have" with occasional "got ack 2 [0-9a-f]{40}". The latter is upload-pack acking this way.

This was done to prevent already-known-to-be-common objects filling up the list of known common commits on the server side. The remaining slots can be used to discover common commits on other branches, so that we can minimize the transfer. It was an important optimization when dealing with sets of branches that are long.

This unfortunately breaks down quite badly in this case, since the remaining "branch" it keeps following is the other history Chris's tree has never heard of down to its root in vain.

It might be worth changing fetch-pack to note that it has sent many "have"s after it got an "continue" ACK, and give up early, say using a heuristic between the age of the commit that did got an ACK and the one we are about to send out as a "have".

Previous: Linus TorvaldsNext: Junio C Hamano
Message 7 of 23 in “Slow fetches of tags”
  1. Ralf BaechleMay 24, 2006
  2. Linus TorvaldsMay 24, 2006
  3. Linus TorvaldsMay 24, 2006
  4. Junio C HamanoMay 24, 2006
  5. Linus TorvaldsMay 24, 2006
  6. Linus TorvaldsMay 24, 2006
  7. Junio C HamanoMay 25, 2006
  8. Junio C HamanoMay 25, 2006
  9. Ralf BaechleMay 26, 2006
  10. upload-pack: stop "ack continue" when we know common commits for wanted refsJunio C Hamano, May 27, 2006
  11. Ralf BaechleMay 25, 2006
  12. Junio C HamanoJul 26, 2006
  13. Johannes SchindelinJul 28, 2006
  14. Teach the git wrapper about --name-rev and --name-rev-by-tagsJohannes Schindelin, Jul 28, 2006
  15. Junio C HamanoJul 28, 2006
  16. Linus TorvaldsJul 28, 2006
  17. Johannes SchindelinJul 28, 2006
  18. Nguyễn Thái Ngọc DuyJul 29, 2006
  19. Johannes SchindelinJul 29, 2006
  20. Junio C HamanoMay 24, 2006
  21. Ralf BaechleMay 24, 2006
  22. Junio C HamanoMay 24, 2006
  23. Ralf BaechleMay 25, 2006

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.