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

Re: Git 2.26 fetches many times more objects than it should, wasting gigabytes

From
Jeff King <peff@peff.net>
Date
Apr 22, 2020, 19:18 UTC
Message-ID
<20200422191841.GA558336@coredump.intra.peff.net>
In-Reply-To
<20200422165358.GB140314@google.com>
On Wed, Apr 22, 2020 at 09:53:58AM -0700, Jonathan Nieder wrote:
> When process_acks sees an ACK, it passes it on to the negotiator.
> It wants to record that it received an ack to reset in_vain, but
> it forgets to!  The function is initialized and read but never
> written to.

I wondered if it might be something like this, too (and this might well be an independent bug), but...

Show 15 quoted lines
> So I'd expect the following to help:
> 
> diff --git i/fetch-pack.c w/fetch-pack.c
> index 1734a573b01..a1d743e1f61 100644
> --- i/fetch-pack.c
> +++ w/fetch-pack.c
> @@ -1287,6 +1287,8 @@ static int process_acks(struct fetch_negotiator *negotiator,
>  			struct object_id oid;
>  			if (!get_oid_hex(arg, &oid)) {
>  				struct commit *commit;
> +
> +				received_ack = 1;
>  				oidset_insert(common, &oid);
>  				commit = lookup_commit(the_repository, &oid);
>  				if (negotiator)

It doesn't. We never get any ACK from the server at all, because we give up on sending haves before hitting any common commit.

-Peff
Previous: Junio C Hamano
Message 18 of 18 in “Git 2.26 fetches many times more objects than it should, wasting gigabytes”
  1. Lubomir RintelApr 22, 2020
  2. Jeff KingApr 22, 2020
  3. Jeff KingApr 22, 2020
  4. Jeff KingApr 22, 2020
  5. Junio C HamanoApr 22, 2020
  6. Jeff KingApr 22, 2020
  7. Jonathan TanApr 23, 2020
  8. Junio C HamanoApr 23, 2020
  9. Jeff KingApr 24, 2020
  10. Jonathan NiederApr 22, 2020
  11. Jeff KingApr 22, 2020
  12. Revert "fetch: default to protocol version 2"Jonathan Nieder, Apr 22, 2020
  13. Junio C HamanoApr 22, 2020
  14. Jeff KingApr 22, 2020
  15. Jeff KingApr 22, 2020
  16. Jonathan NiederApr 22, 2020
  17. Junio C HamanoApr 22, 2020
  18. Jeff KingApr 22, 2020

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.