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

Re: [PATCH] upload-pack: do not lazy-fetch "have" objects

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 15, 2020, 22:55 UTC
Message-ID
<xmqqpn8wie21.fsf@gitster.c.googlers.com>
In-Reply-To
<20200715223112.2018556-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 5 quoted lines
> When upload-pack receives a request containing "have" hashes, it (among
> other things) checks if the served repository has the corresponding
> objects. However, it does not do so with the
> OBJECT_INFO_SKIP_FETCH_OBJECT flag, so if serving a partial clone, a
> lazy fetch will be triggered first.
OK.  

Fixing issues hit by real users reactively is a necessary and good thing, but this is not the first time we patch callers of has_object_file() for this kind of "we are merely trying to determine the boundary of what we have, so that we know what we need to add to this repository" queries, I am afraid.

Perhaps it is a good idea to sweep all the hits from "git grep -e has_object_file \*.c" and audit the codebase to see if there are other problematic ones?

For example, list-objects.c::process_blob() tries to if the object exists when --exclude-promisor-objects is in effect so that it can return early if the object is missing and it is a promisor object. I would imagine that we would not want to lazy-fetch the object in this case.

Thanks.  Will queue.
Previous: Jonathan TanNext: Jeff King
Message 2 of 6 in “upload-pack: do not lazy-fetch "have" objects”
  1. upload-pack: do not lazy-fetch "have" objectsJonathan Tan, Jul 15, 2020
  2. Junio C HamanoJul 15, 2020
  3. Jeff KingJul 16, 2020
  4. Junio C HamanoJul 16, 2020
  5. upload-pack: do not lazy-fetch "have" objectsJonathan Tan, Jul 16, 2020
  6. Jeff KingJul 20, 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.