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

Re: [PATCH] connected: distinguish local/remote bad objects

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jun 9, 2022, 17:17 UTC
Message-ID
<20220609171759.347681-1-jonathantanmy@google.com>
In-Reply-To
<xmqqh74upyz3.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 34 quoted lines
> If the missing object you found is reachable from existing tips
> (i.e. local aka UNINTERESTING) and also from what they should have
> sent (i.e. remote tips), when we discover that the object does not
> exist locally (but we can have an in-core shell object whose object
> name is already known because child objects that are closer to the
> tips than the missing object do exist and point at it), does this
> new heuristic work reliably?  
> 
> Do we always die and report bad_object() with UNINTERESTING in the
> the flags variable, or only when we are lucky?
> 
> IOW, if our current branch pionts at A, while the other side says
> they are updating it to B,
> 
>     X-----o-----A
>      \
>       x---B
> 
> we try to traverse "rev-list ^A B" and make sure everything exists.
> If we find objects 'o' missing, it is clear that it was something we
> were supposed to have on the local side even before we started the
> fetch.  But if 'X' is missing, by the time we notice and report a
> missing object, do we always reliably know that it ought to be
> reachable from both?  Or do we have 50/50 chance that the traversal
> comes from 'o' earlier than from 'x' (in which case X is found to be
> missing when we try to see who is the parent of 'o', and flags have
> UNINTERESTING bit), or later than from 'x' (in which case X is found
> when trying to see who the parents of 'x' is, and we may not know
> and we may not bother to find out if X is also a parent of 'o',
> hence we'd still say 'You do not have X, and we were looking at 'x',
> which we got from the other end, so they were supposed to have sent
> it', which would be a misdiagnosis)?
> 
> Thanks.

Ah, good catch. I'll take a look into fixing this. (A misdiagnosis would defeat the purpose of this patch, yes.)

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “connected: distinguish local/remote bad objects”
  1. connected: distinguish local/remote bad objectsJonathan Tan, Jun 8, 2022
  2. Junio C HamanoJun 8, 2022
  3. Jonathan TanJun 9, 2022
  4. Junio C HamanoJun 9, 2022
  5. Jonathan TanJun 9, 2022
  6. Ævar Arnfjörð BjarmasonJun 9, 2022
  7. fetch,fetch-pack: clarify connectivity check errorJonathan Tan, Jun 10, 2022
  8. Junio C HamanoJun 10, 2022
  9. Jonathan TanJun 17, 2022

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.